Also remember certain 3rd party libs licenses may prohibit static linking..


 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Jean-Sébastien Guay
Sent: Tuesday, March 25, 2008 9:11 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] building osg statically linked on Win32

Hello Andreas,

> In cmake I found the options to switch from /MDd and /MD to /MTd and /MT
but I can't still find the option to switch from Dynamic Library to Static
Library.

DYNAMIC_OPENSCENEGRAPH is the one you're looking for I think.

And I believe most users use dynamic libraries for OSG because frankly, it
would give a huge executable. I personally prefer to have OSG installed in a
general place on my system and refer to it with environment variables in my
own projects. That way I have only one copy of it, and also I can update OSG
from SVN and then the updated version is available to all my projects at
once.

At work we have OSG in CVS alongside our projects, so we refer to it with
relative paths ("..\..\OSG\lib.rel\win32-vc8\osg.lib") in our projects. That
also works well.

There's also the issue of plugins: in the past linking OSG statically would
not pick up plugins and then you'd have problems loading files from your
program. I think that was fixed, but I can't remember the specifics. The
archives will know more, my memory is not what it once was.

All in all, it's a path less traveled for sure, but it should work or if it
doesn't, it should be made to work. So try it, and please send back any
fixes you need to make for it to work.

Good luck,

J-S
--
______________________________________________________
Jean-Sebastien Guay    [EMAIL PROTECTED]
                                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


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

Reply via email to