[osg-users] Regarding osgOcean

Philip Lamb phil.openscenegraph at eden.net.nz
Fri Apr 8 02:27:45 PDT 2011


Hi,

I also have run into similar issues (errors about invalid forward declarations of fstream) when compiling osgDB on Mac OS X Xcode.

I have identified the cause and two actions to take to fix the problem.

The cause is that osgDB includes a header <osgDB/fstream> which is being picked up the #include <fstream> preprocessor line. The reason why this is occuring is that by default Xcode builds a headermap of all headers used in the project, and the local version of fstream is being used instead of the C++ standard library version.

The fix is to add two build settings at the root of the OSG project:

Code:
HEADERMAP_INCLUDES_FLAT_ENTRIES_FOR_TARGET_BEING_BUILT = NO
ALWAYS_SEARCH_USER_PATHS = NO



Hope this helps.

Regards,
Phil

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=38318#38318








More information about the osg-users mailing list