J-S,

I appreciate the input and insightful discussion. This is good information
to have for both new and experienced developers.

Thank you!

-Shayne

-----Original Message-----
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of
Jean-Sébastien Guay
Sent: Friday, January 28, 2011 12:17 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Linker error during execution

Hi Shayne,

> The setting that you amply described IS what we do. We do it quite often
so
> that things don't run so slow when we're debugging our app (not OSG). We
may
> need to run a while before we break into our code for debugging. Running
> with OSG debug libs is too slow for this scenario so we use the release
libs
> instead with the settings set accordingly.

Yeah, that explains it. So it really was because my wording of "don't 
mix debug and release" was not thoroughly accurate... Sorry about that.

Still, I really recommend most users don't change the default settings, 
because then you're totally on your own. Any dependency you use, you'll 
have to recompile yourself from source, you won't be able to use any 
precompiled binaries. And for new users, I think it's easier just to say 
"link debug to debug, release to release and you're fine". See the OP of 
this thread for example, who was setting /MD in his debug build when OSG 
was built with /MDD.

Plus, just how slow it is in debug is a matter of perspective... It is 
much slower but if you're not debugging too often then it might not 
matter. Honestly, you haven't seen anything until you've used 
boost::persistence in debug. THAT's slow. :-)

And the other thing is, if you're not actively debugging, then you can 
run without attaching the debugger (use Ctrl-F5 instead of F5). Then 
it's much faster than running with the debugger attached (not quite as 
fast as release, but much faster). And then you can attach the debugger 
only when you get to a point where you want to debug the running code. 
That's how we survive using boost::persistence in debug - the 
persistence is used in loading/saving files, so we start without the 
debugger, load our scenario, and then attach the debugger. Loading is 
therefore much faster than with the debugger attached. But of course 
that doesn't work if we need to debug the actual loading of a scenario. 
Then we're screwed :-)

Another approach could be to always run in release, and just have 
another configuration with symbols (and possibly with optimization 
turned off). Sure, why not.

But I digress. To each his own. We use release and debug, with the 
default settings in debug, and just make sure not to mix the two. I 
recommend the same for new users, but more experienced users can do 
whatever they want and there are many different ways to get mostly the 
same result... It all comes down to knowing what you're doing, and if 
you don't want to know all the small details then you'd be better 
keeping the default settings I think.

I'll make sure to be more precise next time I talk about not mixing A 
and B... :-)

J-S
-- 
______________________________________________________
Jean-Sebastien Guay    jean-sebastien.g...@cm-labs.com
                                http://www.cm-labs.com/
                         http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to