Build Boost Library with Visual Studio 2010 (x86)

By Christopher, May 5, 2010

Yesterday I struggled with building boost library for Visual Studio 2010, which I needed for my upcoming bachlor thesis.

At the moment you need to build it on your own, because no prebuild packages are available for VS2010.

I was not able to build it on the first try therefore here comes short instructions

Step by step:

  1. Download //1.43 beta does not work on my setup (can’t build all targets)
  2. Extract the boost files to C:\boost
  3. Open START->PROGRAMS->Microsoft Visual Studio 2010 -> Visual Studio Tools->Visual Studio Prompt
  4. Type:
  5. C:
  6. cd boost
  7. bootstrap.bat //for generating the build enviroment
  8. 1
    bjam --stagedir="c:\boost" --build-type=complete --toolset=msvc-10.0 --with-regex --with-date_time --with-thread --with-signals --with-system --with-filesystem --with-program_options stage
  9. You could replace
     --toolset=msvc-10.0 with --toolset=msvc-9.0

    if you want to build it with Visual Studio 2009

  10. You could replace stagedir with another directory or you leave it and do it my way: after building was finished copy including lib folder to c:\boost\
  11. In Visual Studio add additional library and include paths to c:\boost\lib and c:\boost to your project for “Debug” and “Release” configuration

My post is based on: