Setting up boost C++ lib

  1. Download the latest version of boost from www.boost.org. The current version at the time of this writing is 1.51.0.

  2. Extract the contents of the zip.

  3. Execute ‘bootstrap.bat’

  4. Open “Visual Studio Command Prompt 20xx”

  5. cd over to the main boost folder

  6. Execute the command:

b2 --toolset=msvc-10.0 --build-type=complete stage

However, if you have multiple cores you can add this to the end of the command ‘-jN’ where ‘N’ is the number of threads.

6a. (optional – use a separate boost folder) For x86_x64:

b2 --toolset=msvc-10.0 --with-serialization --build-type=complete architecture=x86 address-model=64

6b. (optional) Building with zlib support

-sZLIB_SOURCE="C:\zlib-1.2.8"

6c. (optional) Building with bzip2 support

-sBZIP2_SOURCE="C:\bzip2-1.0.6"
  1. Create a new ‘Win32 Console Application’ project.

  2. Right click on the project name (left side) and choose Properties.

  3. Click VC++ Directories.

  4. Edit the ‘Include Directories’ to have the main boost folder. So if boost is located in ‘C:\boost_1_51_0’ you would include that directory.

  5. Edit the ‘Library Directories’ to have the folder ‘stage\lib’. This is located within the boost folder.

  6. You may now use the boost C++ libraries!

Build with XP support for VS2013:

b2 --toolset=msvc-12.0_xp define=BOOST_USE_WINAPI_VERSION=0x0501 --build-type=complete stage

https://svn.boost.org/trac/boost/ticket/9196