- Category: Windows
- Published on 16 May 2012
- Written by Thomas Hogarth
- Hits: 6288
Compiling with Visual Studio 6.0
With the advent of Visual Studio Express (see above), going through all the hoops required to get OpenSceneGraph to compile on Visual Studio 6.0 seems a lot less appealing. It's probably a lot easier to just install VS Express and use that. You get a free, up-to-date compiler and development environment in which you can work, and you don't need to worry about VS 6's issues. Nonetheless, instructions to get OpenSceneGraph to compile in Visual Studio 6.0 follow.
VS 6 has poor support for STL templates. You must obtain STLport http://www.stlport.org/download.html or equivalent (such as dinkumware's replacement at http://www.dinkumware.com/ which I have not tested).
Please use STLport-4.5, since earlierer and newer versions cause more or less problems!!!
You only need the header files supplied with stlport - no need to compile or edit the code installed, with the following exception:
Edit stlport/stl_user_config.h at about line 45 (your's may vary) and comment _IN_ (should be commented _OUT_ by default)
# define _STLP_NO_OWN_IOSTREAMS 1
Set the include file paths (under tools Options..., subtab Directories) to include the stlport include directory, and raise this directory up the list of include search paths (or else MS's old and non-useful stl will be used first). This is a good opportunity to add the Openthreads & Producer include file paths as well since they will be used by many projects.
The Directories tab can also be used to set search path for libraries - set these to include Producer & Openthreads.
Building OpenSceneGraph 1.2
The .dsp files included with the 1.2 versions of OpenSceneGraph, Producer, and OpenThreads have some settings that are not compatible with VS 6, in order to enable 64 bit builds in VS 8. These settings must be changed, prior to building with VS 6, by replacing all instances of:
- $(PlatformName) with win32, and
- $(ConfigurationName) with Debug or Release as appropriate.
A Perl script is in OpenSceneGraph/VisualStudio/fixup-vc6-dsps.pl to perform these changes automatically. Run it using either Windows or Cygwin Perl.