Compiling on Windows

The following instructions assume that Microsoft Visual Studio 2008 express (mscv9) is installed. The express edition is free to download, but only has the 32 bits option.

The project properties can be changed though the Property Pages. Access to the Property Pages is done by clicking Project->Properties (from the top menu) or by right-clicking on the project itself and selecting properties.

To change the output file

Linker->General and "Output file"

To change the output .lib file

Linker->Advanced and "Import Library"

To change the include directory

C/C++->General and "Additional Include Directory"

We strongly suggest using the program Tortoise for the svn and cvs repository management.

Installing Qt4

Qt takes the longest to install but is trouble free. Simply follow these instructions and be patient. It can take up to two hours to configure and 4 hours to make. It builds both the release and debug version.

  1. Download Replace x.x with the one of the latest version (4.5.1 is working with the current SGeMS source code).

  2. unzip into a directory ( e..g C:\Qt )

  3. open Visual Studio Command Prompt (from the start menu)

  4. type cd C:\QT (or wherever QT has been unzipped)

  5. type configure, then o for the open source option and y to accept the license.

  6. type nmake install

Finally set the set environment variable QTDIR to the Qt directory e.g. QTDIR = c:\QT\4.5.1.

Creating working directory

Create a directory (e.g. c:/sgems-dev ) and set the environment variable SGEMS_BUILD to that directory.

Installing Coin

  1. Download coin from the svn repository at
  2. Set environment variable COINDIR, e.g. (c:/sgems-dev/Coin)
  3. double click .sln file in $(COINDIR)/build/msvc9
  4. In Linker->General "Output" : Add the following path to $(COINDIR)/bin/coin3d.dll for the debug and $(COINDIR)/bin/coin3.dll for the release version
  5. In Linker->Advanced "Import Library": change LIB storage to $(COINDIR)/lib/coin3.lib and $(COINDIR)/lib/coin3d.lib for the release and debug mode.

Installing Simvoleon

The Simvoleon library is the most troublesome to install.

  1. Download simvoleon to the SGEMS_BUILD folder (e.g. c:/sgems-dev/SIMVoleon) from the svn repository at
  2. copy $(SGEMS_BUILD)\SIMVoleon\build\msvc8\lib\VolumeViz\nodes to msvc9\lib\VolumeViz\nodes
  3. Open the .sln file in $(SGEMS_BUILD)\Simvoleon\build\msvc9\
  4. In Linker->General "Output" : change DLL storage to $(COINDIR)/bin (We want all the dll to be in the same Coin/bin folder)
  5. In Linker|Advanced: change LIB storage to $(COINDIR)/lib
  6. In C/C++->General "include additional path" add $(COINDIR)\build\msvc9\include to the INCLUDE path
  7. build simvoleon2 in release and debug

Installing SoQT

  1. Download SoQt to the SGEMS_BUILD folder from the svn repository at
  2. In Linker->General "Output" : change DLL storage to $(COINDIR)/bin
  3. In Linker->Advanced "Import Library": change LIB storage to $(COINDIR)/lib
  4. add $(COINDIR)\build\msvc9\include to the INCLUDE path
  5. build SoQt in release and debug

Note: There seems to be some problems with the latest soqt svn revision. Some files are missing, but not needed for sgems, hence need to be remove from the project. These three files are in the template directory and with a missing name (they are only refer as soqt with a yellow/orange icons). When you right click on the file and look at the build operation you will see that it was supposed to be related to the spaceball files. Remove them from the project by either selecting them and pressing delete or by right-click->exclude from project.

If there is a problem with SoQtRenderArea.cpp. In the template source folder (still in VC++) find the file, right click and select compile.

Installing Python

  1. Download and install python2.6
  2. set environment variable PYTHONDIR
  3. in $(PYTHONDIR)/include/pyconfig.h, line 331, do the following changes to avoid having to build the python debug library
    #            ifdef _DEBUG
    #                pragma comment(lib,"python26.lib")
    //#                pragma comment(lib,"python26_d.lib")
    #            else
    #                pragma comment(lib,"python26.lib")
    #            endif /* _DEBUG */

Building SGeMS

  1. Create a folder to build SGeMS and set the environment SGEMS_BUILD to that folder
  2. add %QTDIR%\bin;%COINDIR%\bin; to PATH environment variable
  3. Download GsTL from cvs and GsTLAppli-qt4 from svn to $(SGEMS_BUILD) SGEMS:
    svn co GsTLAppli-qt4
    cvs -z3 co -P GsTL
  4. In the directory GsTLAppli-qt4/WinGsTLAppli open WinGsTLAppli.sln (a VS9 solution file). You should now have VS9 open with 12 projects.
  5. Build both in release and debug mode.
  6. Copy the release version of GsTLwidgets.dll to $(QTDIR)/plugins/designer/

Finally the last steps is to link SGeMS to the plugin directory. Two alternatives are available

  • Set the environment variable GSTLAPPLIHOME to the folder %SGEMS_BUILD%/GsTLAppli-qt4/ or
  • copy the folder %SGEMS_BUILD%/GsTLAppli-qt4/plugin in the folders %SGEMS_BUILD%/GsTLAppli-qt4/lib/win32/debug and %SGEMS_BUILD%/GsTLAppli-qt4/lib/win32/release