c++visual-c++boostvisual-studio-2012boost-build

Boost compiling with MSVC 11 (VS 2012)


How to build Boost (I tried version 1.48.0) with Visual Studio C++ 11? bootstrap.bat cannot find toolset vc11. I added toolset vc11 to F:\Programming\boost_1_48_0\tools\build\v2\engine\build.bat but got a message:

ERROR: Cannot determine the location of the VS Common Tools folder.

EDIT: The Ferruccio answer works for VS 2012 Express and Boost 1.51.0 too.


Solution

  • I managed to get it to build by following these steps:

    1. Open a Visual Studio command prompt. From the start menu it's: All Programs|Microsoft Visual Studio 11|Native x64 Command Prompt.
    2. Unzip boost_1_48_0.zip and set the working directory to boost_1_48_0
    3. run bootstrap.bat
    4. run bjam.exe

    It does generate a lot of warnings about not being able to detect the toolkit version, but it proceeds anyway.

    Update: I created GitHub repo called cclibs which makes it simpler to build Boost and some other C++ libraries.