summaryrefslogtreecommitdiffstats
path: root/doc/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/index.html')
-rw-r--r--doc/index.html33
1 files changed, 15 insertions, 18 deletions
diff --git a/doc/index.html b/doc/index.html
index ae70dd6..7b12275 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -364,32 +364,29 @@ AR=$(CROSS)ar</pre>
<h3>Step 5d: Cross compile your Project (OSG)</h3>
<p>
- 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:
</p>
- <ul>
- <li>
- Define <code>OSG_LIBRARY_STATIC</code>
- </li>
- <li>
- Use the macro
- <code>USE_GRAPHICSWINDOW()</code>
- to explicitly reference your graphics system
- </li>
- <li>
- Use the macro
- <code>USE_OSGPLUGIN(&lt;plugin&gt;)</code>
- to explicitly reference any plugin you might want to use
- </li>
- </ul>
+ <pre>#ifdef OSG_LIBRARY_STATIC
+USE_GRAPHICSWINDOW()
+USE_OSGPLUGIN(&lt;plugin1&gt;)
+USE_OSGPLUGIN(&lt;plugin2&gt;)
+...
+#endif</pre>
<p>
Look at <code>examples/osgstaticviewer/osgstaticviewer.cpp</code> in the
OpenSceneGraph source distribution for an example. This example can be
- compiled with
+ compiled with the following command:
</p>
- <pre>i686-pc-mingw32-g++ -DOSG_LIBRARY_STATIC \
+ <pre>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`</pre>
+ <p>
+ The <code>i686-pc-mingw32-pkg-config</code> command from mingw-cross-env will
+ automatically add <code>-DOSG_LIBRARY_STATIC</code> to your compiler flags.
+ </p>
<h3>Further Steps</h3>