Building OpenSG 1.x using Visual Studio 2003/2005/2008 and scons
Supported compilers are Visual Studio 2003, 2005 and 2008.
The image libs (jpeg, png, tiff) are automatically unzipped into OpenSG/../supportlibs and linked into the OSGSystem.dll.
- Install python from http://www.python.org/ (the windows installer is fine)
Install scons from http://www.scons.org/ (the windows installer is fine)- Add the python install directory (e.g. C:\Python24) to the PATH environment variable. (You can do this locally in the command-shell if you don't want to change your global settings.)
Visual Studio 2003
Open a cmd shell and go into the OpenSG directory and type ".\scons compiler=msvc71"
The headers, libs and examples are installed in OpenSG/Build/win32-msvc71/installed
Visual Studio 2005
Open a cmd shell and go into the OpenSG directory and type ".\scons compiler=msvc80"
The headers, libs and examples are installed in OpenSG/Build/win32-msvc80/installed
In the Visual Studio 2005 Express edition the platform sdk is missing so it is necessary to install the platform sdk from http://www.microsoft.com/downloads/details.aspx?FamilyId=0BAF2B35-C656-4969-ACE8-E4C0C0716ADB&displaylang=en
If you have trouble compiling because of the missing openexr_vc80.lib, you can unpack the dist\win\supportlibs.zip and add the directory to your scons command line, e.g. "exr=unpackdir". This will only work for the release build. If you have trouble just set "exr=no". Read here as well for more info:
http://www.mail-archive.com/opensg-users%40lists.sourceforge.net/msg08541.html
Visual Studio 2008
(This is with VC9 Enterprise Trial version, 2008 Express is also claimed to work, but might need similar work as listed with 2005)
Open a cmd shell and go into the OpenSG directory and type ".\scons compiler=msvc90"
The headers, libs and examples are installed in OpenSG/Build/win32-msvc90/installed
Note that you need to copy both exe and manifest files of the tutorials if you move them to a different directory, otherwise you'll get a on-informative error box trying to start the program.
Misc
- Type ".\scons -h" to see all possible options.
- Use ".\scons type=both" to get both degug and release versions.
If you run cygwin, be sure to use ".\scons.bat" to start the right file.- Use ".\scons -j 2" for a dual core system, or ".\scons -j N" for an N-core system.
The strike-through lines are only necessary if you build OpenSG 1.6.
