On 02/27/2012 02:12 PM, Chris Hanson wrote:
On Mon, Feb 27, 2012 at 11:34 AM, Shayne Tueller
mailto:shayne.tuel...@hill.af.mil>> wrote:
All,
I believe this issue has been addressed before but I can't find
the previous discussion. Therefore I will ask again...
Is there a way to get Release-built OSG libs to play nicely with
an app that is built with Debug? Right now if I link with
Release-built OSG libs, my app (built with Debug option) doesn't
work. If I link with Debug-built OSG libs, things work fine. If I
built my app with Release, then it also works fine.
Here is an explanation of why this doesn't work...
http://msdn.microsoft.com/en-us/library/ms235460%28v=vs.80%29.aspx
The article talks about the differences between msvcrt.dll and
msvcr.dll, but the same problem exists when you mix debug and
release runtime libraries. You can't pass a pointer generated by your
app in debug mode (using the debug version of the C runtime) to OSG in
release mode (using the release version of the C runtime).
The key is the C runtime flag sent to the compiler. Either compile
everything with /MD (Multithreaded DLL) or /MDd (Multithreaded debug
DLL). Mixing them is bad.
However, I believe you could build a release build of your app with
no optimization and with all debug symbols included. This should allow
you to debug your code (though not as completely as a full Debug
build) from within a release build.
Yeah, this works (sort of).
--"J"
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org