Building Boost 1.58 for 32-bit and 64-bit architectures with Visual Studio 2013

By , last updated September 23, 2019

This post describes building of boost library with Visual Studio 2013.

Other versions:
Install boost 1.64 with VS2017
Install Boost 1.62 with VS2015
Install Boost 1.60 with VS2015

Building Boost have never been easier. Just double click this .bat-file and wait for it to be finished. Put this in a file called build_boost_1_58_vs2013.bat and place it next to the boost_1_58_0 folder.

call "%VS120COMNTOOLS%..\..\VCvcvarsall.bat" x86

cd boost_1_58_0
call bootstrap.bat

rem Most libraries can be static libs
b2 -j8 toolset=msvc-12.0 address-model=64 architecture=x86 link=static threading=multi runtime-link=shared --build-type=minimal stage --stagedir=stage/x64
b2 -j8 toolset=msvc-12.0 address-model=32 architecture=x86 link=static threading=multi runtime-link=shared --build-type=minimal stage --stagedir=stage/win32


The first line will add the Visual Studio tools to PATH, in essence, you can just double click this file to build boost. For a Windows user, it can’t get much easier than this.

Then add stage/$(Platform)/lib as additional library directory in project settings for all configuration types and for all platforms.