Hi Stephan,

I think we'll need to do a purge on the static build issue after 2.0.
I have introduced a few additions to osgDB and osgViewer to help the
static build, but this hasn't been rolled out throughout the rest of
the plugins yet.  The Windows build problems also will need a couple
of rev's to get right.

Robert.

On 6/15/07, Stephan Huber <[EMAIL PROTECTED]> wrote:
Hi Robert,

Robert Osfield schrieb:
>  look at osgstaticviewer, you'll see extras
> added to the CMakeLists.txt and the source code to get the plugins and
> osgViewer to work.
thanks for the suggestions, I'll have a look today.

I've spend some time investigating the CMakeLists.txt for osg/osgDB etc
and I think there is something missing for windows.

example:
IF   (DYNAMIC_OPENSCENEGRAPH)
    ADD_DEFINITIONS(-DOSG_LIBRARY)
ELSE (DYNAMIC_OPENSCENEGRAPH)
    ADD_DEFINITIONS(-DOSG_LIBRARY_STATIC)
ENDIF(DYNAMIC_OPENSCENEGRAPH)

I think, this should be changed to

IF   (DYNAMIC_OPENSCENEGRAPH)
    ADD_DEFINITIONS(-DOSG_LIBRARY)
ELSE (DYNAMIC_OPENSCENEGRAPH)
    ADD_DEFINITIONS(-DOSG_LIBRARY_STATIC)
    ADD_DEFINITIONS(-DOT_LIBRARY_STATIC)
ENDIF(DYNAMIC_OPENSCENEGRAPH)


because osg includes some of the OpenThreads-header, and without the
additional define, they get included with this decls-stuff, needed for
dll-generation which will be the cause for lots of warnings when linking
the final app.

On Linux both defines are a no-op, because the header and function/class
definitions do not change if they get included for static or for dynamic
builds.

I'll modify my CMakeLists.txt and try a build, and report back success,
when I am again in front of a windows-machine.

thanks again,
Stephan
_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to