Hi all, I currently have a problem with some VS 2010 builds with OSG. It doesnt seem to be purely related to OSG but OSG does seem to be a the culprit at revealing the problem.
I am getting the following error (plus some but always similar): Error 5 error LNK2005: "public: __thiscall std::basic_ifstream<char,struct std::char_traits<char> >::basic_ifstream<char,struct std::char_traits<char> >(void)" (??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@XZ) already defined in osgDB.lib(osgDB.dll) C:\Dev\JSBSim.lib(FGInitialCondition.obj) This has been mentioned in a similar thread: http://forum.openscenegraph.org/viewtopic.php?t=6489&postdays=0&postorder=asc&start=0 But since the thread has been dormant for almost a year i figured a new thread might be more appropriate. I have verified and tried all the remedies mentioned there. 1. Verify MD and MDd is used for all projects 2. Verify all projects are built with vs2010. 3. Tried /Force:Multiple (causes heap corruption at runtime) 4. Verified it works in VS 2005. 5. Removed as many #pragma comment(lib, xxx) to ensure we werent linking against non 2010 compiled libs. I have run out of ideas. I was able to fix one set of our problems by including osgs implementation of fstream/ostream instead of std implementation but now when i try to pull in JSBSim(flight dynamics model) the problem raises its ugly head again. I noticed someone mention that it might link properly if all symbols are defined. How would I go about doing that within OSG in order to avoid these problems? Has anyone found a better resolution to this? Here is some other information in case its relevant: Windows 7, Windows XP Visual Studios 2010 SP1 OSG 2.9.8 (though i have verified the osg implementation of fstream is the same in the latest version) JSBSim (6/11) Thanks, Kip ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=50910#50910 _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

