How to build Boost 1.62 with Visual Studio 2015

By , last updated June 28, 2019

Boost 1.62 was released 28th Sept 2016 and can be downloaded from http://www.boost.org/users/history/version_1_62_0.html.

New in this release is Fiber and QVM libraries. They are libraries for userland threads/fibers, and QVM is a library for working with static size quaternions, vectors and matrices. With emphasis on 2, 3 and 4D sizes. They sure do look promising if you’re into game programming. QVM doesn’t seem like just another vector library. It seems it can integrate with most other vectors from graphics engines so long they have a sane storage.

This guide will build Boost for 32-bit and 64-bit architectures in a single click. Scripts for the impatient are available at GitHub (https://github.com/Studiofreya/boost-build-scripts).

Other Boost and Visual Studio versions:
Building Boost 1.64 with Visual Studio 2017
Building Boost 1.61 with Visual Studio 2015
Building Boost 1.58 with Visual Studio 2015

Building Boost 1.62

Here is a quick howto for Windows and Visual Studio 2015.

1) Download and extract either the .7z or .zip archive.

2) Create a file named build_boost_1_62_vs2015.bat in the same folder as the directory named boost_1_62_0 with contents like this:

call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x86

set cores=%NUMBER_OF_PROCESSORS%
echo Building boost with %cores% cores

cd boost_1_62_0
call bootstrap.bat

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

pause

Run the build_boost_1_62_vs2015.bat file and wait until it finishes.

The rest of the guide will have pictures mention the previous version of Boost, but it should be Boost 1.62.

Finished building Boost 1.60

Using Boost 1.62 with Visual Studio 2015

There are several ways to include Boost library 1.62 in Visual Studio 2015.