03 October 2006

Boost Library And Visual Studio 2005

This will set you up with a top notch development environment for C++ in Windows. Also this will tell you how to get the Boost::Python libraries to work with as well (which can never be a bad thing).
  1. Download Visual C++ 2005 Express from here.
  2. Then go and install the Platform SDK. I recommend installing it into C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK as then the environment variables are already set up for you in VC8.
  3. Go and download Python where the latest version is 2.5. Install Python 2.5 to the default installation directory of c:\Python25.
  4. Now it is time to download Boost and make sure you download the source and a precompiled bjam build tool.
  5. Extract Boost to a temporary directory on your hard drive, and copy the bjam.exe into the Boost directory.
  6. Open a command prompt in the Boost root directory(where you copied bjam.exe to).
  7. Run the batch file for registering Visual Studio commandline variables : C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\vsvars32.bat
  8. Run the following command line to compile and install Boost in "c:\Boost" with no checked iterators:bjam "-sTOOLS=vc-8_0" "-sPYTHON_VERSION=2.5" "-sPYTHON_ROOT=c:\Python25" "-sBUILD=debug release <define>_CRT_NONSTDC_NO_DEPRECATE <define>_CRT_SECURE_NO_DEPRECATE <define>_SECURE_SCL=0 <define>_SCL_SECURE_NO_DEPRECATE <define>_HAS_ITERATOR_DEBUGGING=0" install
  9. What I tend to do then is copy Boost to where my development libraries go, and then add those directories to the lib and include directories in Visual C++.
Now you are ready to go for Boost-ified C++ development and you will have the Boost Python libraries as well for binding your code to a scripting language. Next install TortoiseSVN and install the settings outlined in one of my previous posts for the toolbars, and then you should be ready to check some code out and develop like a demon.