wiki:BuildVSScons

Building OpenSG 1.x using Visual Studio 2003/2005 and scons

Supported compilers are Visual Studio 2003 and 2005.

The image libs (jpeg, png, tiff) are automatically unzipped into OpenSG/../supportlibs and linked into

the OSGSystem.dll.

  • 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

The same instructions as for VS 2005 apply, just use ".\scons compiler=msvc90" to start the scons build.

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.

Last modified 6 years ago Last modified on 03/15/11 06:49:24