How to build Boost 1.60 with Visual Studio 2015

By , last updated October 8, 2016

C++ Boost 1.60 library can be downloaded from http://www.boost.org/users/history/version_1_60_0.html.

Other Boost and Visual Studio versions:
Building Boost 1.62 with Visual Studio 2015
Boost 1.61 with VS2015
Boost 1.58 with VS2015
Boost 1.58 for 32-bit and 64-bit architectures with Visual Studio 2013

Building Boost 1.60

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_60_vs2015.bat in the same folder as the directory named boost_1_60_0 with contents like this:

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

cd boost_1_60_0
call bootstrap.bat

rem Most libraries can be static libs
b2 -j8 toolset=msvc-14.0 address-model=64 architecture=x86 link=static threading=multi runtime-link=shared --build-type=minimal stage --stagedir=stage/x64
b2 -j8 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_60_vs2015.bat file and wait until it finishes.

Finished building Boost 1.60

Using Boost 1.60 with VS2015

There are a couple ways to use Boost 1.60 with Visual Studio 2013 or 2015, here are two ways. Property pages and Property sheets.

All scripts are available at GitHub.

Comments

  1. MATT May 26, 2016 Leave a Reply

    Thaks for this…Should there be an “s” in the library name??
    libboost_serialization-vc140-mt-s-1_60.lib

  2. MATT May 27, 2016 Leave a Reply

    Thanks, Kent.
    I got confused when I saw “link=static” in the script. I’ve googled it but I am still not sure: what is the difference in link and runtime-link?
    Also: when I run the .bat, it says cannot find the path specified…but then it runs and builds boost (you are awesome!)? Any idea on why that is?

  3. kent June 1, 2016 Leave a Reply

    The .bat-file is not designed to be within the boost folder, but one level up.

    It’s probably the cd boost_1_60_0 which says “cannot find the path specified”.

    The switch link=static tells b2 to build static libraries of the boost libraries.

    The switch runtime-link= tells b2 how the runtime libraries should be linked in (static or dynamic).

  4. MATT June 4, 2016 Leave a Reply

    Thank you, again!

  5. MATT June 4, 2016 Leave a Reply

    The directions read this:
    2) Create a file named build_boost_1_60_vs2015.bat in the same folder as the directory named boost_1_60_0 with contents like this:
    Should they read this?
    2) Create a file named build_boost_1_60_vs2015.bat in ‘one up’ from booost_1_60_0 directory with contents like this:

  6. MATT June 5, 2016 Leave a Reply

    Never mind. I missed it. the boost directory is next to .bat file. Thanks.

Leave a Reply


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

*