After looking at the call stack during the crash, the problem seems to be occurring here:
OSG Viewer.exe!`dynamic initializer for 'osgEphemeris::EphemerisData::_defaultShmemFileName''() Line 16 + 0x27 bytes C++ That references the following line in EphemerisData.cpp: const std::string osgEphemeris::EphemerisData::_defaultShmemFileName = "/tmp/EphemerisData.shm"; I tried changing the path in that line to c:\\EphemerisData.shm since I am using Windows, but I still got the same error. Has anyone seen this before? Thanks, Andrew -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andrew Weitz Sent: Wednesday, May 31, 2006 12:37 PM To: osg users Subject: RE: [osg-users] Error when linking to osgEphemeris.lib Mike, Gordon, I was finally able to fix the linking error. I'm not exactly sure what caused it. Both of my projects were built with /MD. Today, I deleted my entire osgEphemeris directory and synched back to CVS. Then I rebuilt the libraries and tried linking. It worked. I definitely tried this yesterday with no luck. I must've been making a stupid mistake somewhere. Unfortunately, I now get a runtime error. I can link fine and even use #include <osgEphemeris/EphemerisModel>. But when I insert code to create the instance of the EphemerisModel (osg::ref_ptr<osgEphemeris::EphemerisModel> ephemerisModel = new osgEphemeris::EphemerisModel), I the runtime error occurs. Specifically, the program's crashing at _ASSERTE(_CrtIsValidHeapPointer(pUserData)) in dbgheap.c. This happens before my program even loads. In fact, I don't even get near the line of code that is supposed to create the EphemerisModel instance. Once again, I'm stuck. I appreciate your help. Andrew -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gordon Tomlinson Sent: Wednesday, May 31, 2006 10:23 AM To: osg users Subject: RE: [osg-users] Error when linking to osgEphemeris.lib Looking at the error messages it look like it could be a Runtime library missmatch Make sure all your projects are built with Multi-threaded Debug DLL (/MDd) or Multi-threaded DLL (/MD) Gordon __________________________________________________________ "Self defence is not a function of learning tricks but is a function of how quickly and intensely one can arouse one's instinct for survival" - Master Tambo Tetsura -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Andrew Weitz Sent: Wednesday, May 31, 2006 10:06 AM To: osg users Subject: RE: [osg-users] Error when linking to osgEphemeris.lib Mike, I synched to CVS yesterday, so I definitely have the most recent build. I'm using VS 2005. I can build and run EphemerisViewer.exe with no problems. I tried modeling my vcproj settings against those of EphemerisViewer, but I still get linking errors. I'm completely stuck here. Thanks for your help. Andrew -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mike Weiblen Sent: Tuesday, May 30, 2006 11:54 PM To: osg users Subject: Re: [osg-users] Error when linking to osgEphemeris.lib Also, are you able to build EphemerisViewer.exe without error? Perhaps model your build settings after vc7/Viewer/Viewer.vcproj instead? -- mew Andrew Weitz wrote: > I've been trying to solve a problem linking to osgEphemeris.lib for > several hours with no luck. I built the library using the default build > settings that were in osgEphemeris\VC7\osgEphemeris\osgEphemeris.vcproj. > When I try and include the library in my application (via > Linker->Input), I get the following errors: > > > msvcprt.lib(MSVCP80.dll) : error LNK2005: "class > std::basic_ostream<char,struct std::char_traits<char> > & __cdecl > std::operator<<<char,struct std::char_traits<char>,class > std::allocator<char> >(class std::basic_ostream<char,struct > std::char_traits<char> > &,class std::basic_string<char,struct > std::char_traits<char>,class std::allocator<char> > const &)" > ([EMAIL PROTECTED]@std@@[EMAIL PROTECTED]@1@@std@@YAAAV?$basic_ostream > @[EMAIL PROTECTED]@std@@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED] > @@[EMAIL PROTECTED]@2@@0@@Z) already defined in > osgEphemeris.lib(makeMoonImages.obj) > > msvcprt.lib(MSVCP80.dll) : error LNK2005: "class > std::basic_string<char,struct std::char_traits<char>,class > std::allocator<char> > __cdecl std::operator+<char,struct > std::char_traits<char>,class std::allocator<char> >(class > std::basic_string<char,struct std::char_traits<char>,class > std::allocator<char> > const &,char const *)" > ([EMAIL PROTECTED]@std@@[EMAIL PROTECTED]@1@@std@@YA?AV?$basic_string@ > [EMAIL PROTECTED]@std@@[EMAIL PROTECTED]@2@@[EMAIL PROTECTED]@[EMAIL > PROTECTED]) already defined > in osgEphemeris.lib(makeMoonImages.obj) > > C:\gsti\cpp\Visualization\OSG Viewer\Release\OSG Viewer.exe : fatal > error LNK1169: one or more multiply defined symbols found > > > If I include makeMoonImages.cpp in my project, it builds fine, but I > crash at runtime. And it's obviously not right to include > makeMoonImages.cpp in my project. Has anyone seen these errors before? > > I'm sorry to ask such a platform- and environment-specific question to > the group, but I'm completely stuck here. > > Thanks, > Andrew > _______________________________________________ > osg-users mailing list > [email protected] > http://openscenegraph.net/mailman/listinfo/osg-users > http://www.openscenegraph.org/ > _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/ _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/ _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/ _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/ _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
