Hi Chris,

In the osgOcean project settings, the additional include directories includes 
the osg header directories, including osgDB and osgText. These are put there by 
CMake, which demands those paths in order to generate the project files.

osgText has its own String class based on std::string and osgDB has it's own 
fstream. Both are defined in headers with the same name as the standard library 
headers. So when osgOcean tries to include the standard varieties, it gets 
these overridden files.

By removing those two directories from the additional includes, osgOcean builds 
correctly.

Hm, interesting. CMake should be adding only <osg root>/include to the project's include paths, and not any of <osg root>/include/osg, <osg root>/include/osgText, <osg root>/include/osgDB or anything like that. If that were the case, the include lines in osgOcean (presumably #include <string> and #include <fstream>) would not find the osgText and osgDB versions, you would need to do #include <osgText/String> and #include <osgDB/fstream> specifically to get those, and all would be well in the world (and curse Windows' case-insensitive filesystem in the case of String vs string...).

What version of CMake are you using? I'm pretty sure if CMake generated project files that way for you, it should have generated them that way for us too, unless there's a bug in the version of CMake you're using.

The other possibility - did you manually specify the include directories? If that's the case, then you should have specified the same directory (<osg root>/include) for all *_INCLUDE_DIR settings. Doing that in the CMake GUI and then regenerating should fix the problem too, without needing to remove include paths manually from the project files. This should perhaps be better documented.

Hope this helps,

J-S
--
______________________________________________________
Jean-Sebastien Guay    jean-sebastien.g...@cm-labs.com
                               http://www.cm-labs.com/
                        http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to