Hi,

I'm just trying to get OIIO to compile - this is on Linux (Ubuntu), with the 
current master branch of the repository.


    [ 80%] Building CXX object 
libOpenImageIO/CMakeFiles/optparser_test.dir/optparser_test.cpp.o
    In file included from 
/mount/nvizible_users/hughmacdonald/development/OpenIO/Image/ocio/src/libOpenImageIO/optparser_test.cpp:39:
    
/mount/nvizible_users/hughmacdonald/development/OpenIO/Image/ocio/src/include/optparser.h:
 In function ‘bool OpenImageIO::v0_11::optparse1(C&, const std::string&)’:
    
/mount/nvizible_users/hughmacdonald/development/OpenIO/Image/ocio/src/include/optparser.h:69:
 error: there are no arguments to ‘strchr’ that depend on a template parameter, 
so a declaration of ‘strchr’ must be available
    
/mount/nvizible_users/hughmacdonald/development/OpenIO/Image/ocio/src/include/optparser.h:69:
 note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the 
use of an undeclared name is deprecated)
    
/mount/nvizible_users/hughmacdonald/development/OpenIO/Image/ocio/src/include/optparser.h:
 In function ‘bool OpenImageIO::v0_11::optparse1(C&, const std::string&) [with 
C = MySystem]’:
    
/mount/nvizible_users/hughmacdonald/development/OpenIO/Image/ocio/src/include/optparser.h:118:
   instantiated from ‘bool OpenImageIO::v0_11::optparser(C&, const 
std::string&) [with C = MySystem]’
    
/mount/nvizible_users/hughmacdonald/development/OpenIO/Image/ocio/src/libOpenImageIO/optparser_test.cpp:84:
   instantiated from here
    
/mount/nvizible_users/hughmacdonald/development/OpenIO/Image/ocio/src/include/optparser.h:69:
 error: ‘strchr’ was not declared in this scope
    make[3]: *** 
[libOpenImageIO/CMakeFiles/optparser_test.dir/optparser_test.cpp.o] Error 1
    make[3]: Leaving directory 
`/mount/nvizible_users/hughmacdonald/development/OpenIO/Image/ocio/build/linux64'
    make[2]: *** [libOpenImageIO/CMakeFiles/optparser_test.dir/all] Error 2
    make[2]: Leaving directory 
`/mount/nvizible_users/hughmacdonald/development/OpenIO/Image/ocio/build/linux64'
    make[1]: *** [all] Error 2
    make[1]: Leaving directory 
`/mount/nvizible_users/hughmacdonald/development/OpenIO/Image/ocio/build/linux64'
    make: *** [cmake] Error 2


In optparser_test.cpp, replacing this:

    #include <string>

with

    #include <string.h>

seems to fix it.


I can submit a pull request for this fix, if people consider it appropriate...?

--- 
Reply to this email directly or view it on GitHub:
https://github.com/OpenImageIO/oiio/issues/206
_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

Reply via email to