diff -r 4c75e7307835 doc/index.html --- a/doc/index.html Tue Jan 26 18:19:19 2010 +0100 +++ b/doc/index.html Tue Jan 26 21:11:09 2010 +0100 @@ -364,32 +364,30 @@
- Using static OpenSceneGraph libraries requires a few changes to your source: + Using static OpenSceneGraph libraries requires a few changes to your source. + The graphics subsystem and all plugins required by your application must be + referenced explicitly. Use a code block like the following:
-OSG_LIBRARY_STATIC
- USE_GRAPHICSWINDOW()
- to explicitly reference your graphics system
- USE_OSGPLUGIN(<plugin>)
- to explicitly reference any plugin you might want to use
- +#ifdef OSG_LIBRARY_STATIC +USE_GRAPHICSWINDOW() +USE_OSGPLUGIN(<plugin1>) +USE_OSGPLUGIN(<plugin2>) +... +#endif
Look at examples/osgstaticviewer/osgstaticviewer.cpp
in the
OpenSceneGraph source distribution for an example. This example can be
- compiled with
+ compiled with the following command:
i686-pc-mingw32-g++ -DOSG_LIBRARY_STATIC \ +i686-pc-mingw32-g++ \ -o osgstaticviewer.exe examples/osgstaticviewer/osgstaticviewer.cpp \ `i686-pc-mingw32-pkg-config --cflags openscenegraph-osgViewer openscenegraph-osgPlugins` \ `i686-pc-mingw32-pkg-config --static --libs openscenegraph-osgViewer openscenegraph-osgPlugins`++ The
i686-pc-mingw32-pkg-config
command from mingw-cross-env will + automatically add-DOSG_LIBRARY_STATIC
to your compiler flags. +Further Steps
diff -r 4c75e7307835 src/openscenegraph-1-pkg-config.patch --- a/src/openscenegraph-1-pkg-config.patch Tue Jan 26 18:19:19 2010 +0100 +++ b/src/openscenegraph-1-pkg-config.patch Tue Jan 26 21:11:09 2010 +0100 @@ -195,7 +195,7 @@ +Conflicts: +Libs: -L${libdir} -losg +Libs.private: -lglu32 -lopengl32 -+Cflags: -I${includedir} ++Cflags: -I${includedir} -DOSG_LIBRARY_STATIC diff -uNr OpenSceneGraph-2.8.2.orig/packaging/pkgconfig/openscenegraph-osgPlugins.pc.in OpenSceneGraph-2.8.2/packaging/pkgconfig/openscenegraph-osgPlugins.pc.in --- OpenSceneGraph-2.8.2.orig/packaging/pkgconfig/openscenegraph-osgPlugins.pc.in 1970-01-01 01:00:00.000000000 +0100 +++ OpenSceneGraph-2.8.2/packaging/pkgconfig/openscenegraph-osgPlugins.pc.in 2010-01-17 18:59:13.000000000 +0100