Using a Release DLL in Debug mode is a ODR violation. So the short answer is no, you can't.
The fact that OSG uses the STL (e.g. std::string) in its interface, combined with MSVC debug and checked iterators, makes mixing debug and release binaries resulting in undefined behaviour. Sometimes, it may appear to work. But don't be fooled, it's often more broken than what it appears to be. In some very specific cases, it's possible to mix release and debug builds. My advice: don't. T From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Vincent Bourdier Sent: Tuesday 17 February 2009 12:17 To: OpenSceneGraph Users Subject: Re: [osg-users] [C++/dll] Osg export model ? Hi Tanguy, It seems a good guess. I make my dll in Release mode, and I was testing my application in Debug mode. Release Mode for my application launch correctly. It appears that my std::string problem is solved too \o/ But I know (I hope) it is possible to debug an application based on DLL (release) ... isn't it ? Thanks, I will continue going deeply in this problem. Vincent. 2009/2/17 Tanguy Fautre <tang...@aristechnologies.com> Hi Vincent, Be careful that you respect the ODR (One Definition Rule). Check that you're not compiling your application with different settings. If I had to do a wild guess, I might say you're using mixing Debug/Release builds or that debug/checked iterators are also mixed up. Cheers, Tanguy From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Vincent Bourdier Sent: Tuesday 17 February 2009 11:54 To: osg Subject: [osg-users] [C++/dll] Osg export model ? Hi all, Trying to make a dll with some osg code, I am having some difficulties. It appear that a std::string parameter can cause crashes ... but in OSG they are some std::string arguments... so is there some special code/compilation to use ? I use MSVC 2005 to make the dll and to use it in the other application... Any suggestion/idea would be very appreciated. Thanks, Regards, Vincent. _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org