How to build Boost 1.62 with Visual Studio 2015

By , last updated October 5, 2016

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.61 with Visual Studio 2015
Building Boost 1.60 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.

Comments

  1. Irfan September 29, 2016 Leave a Reply

    Hello Kent,

    Unless you’re using some arcane turn of phrase, then your introductory sentence should have included “released” prior to “yesterday”, as well.

    Regards,

    Irfan.

  2. Kent Fagerjord September 29, 2016 Leave a Reply

    Haha thanks. I’m certain I included “released” when I wrote the article, but it must somehow have been eaten by the editing.

    Thanks!

  3. Irfan September 29, 2016 Leave a Reply

    You’re welcome.

    Irfan.

  4. Steve October 4, 2016 Leave a Reply

    Thanks for posting this. Much simplified.

    • Kent Fagerjord October 4, 2016 Leave a Reply

      Hi Steve,

      Thank you for taking your time to comment!

      It’s appreciated that our work is appreciated.

      Kent

  5. Sam November 3, 2016 Leave a Reply

    This does not build 64 bit binaries with VS 2015 u3 (profession) on win 10, it falls back on the 32 bit build. Works as expected with VS2013. Any ideas?

    Performing configuration checks
    – 32-bit : yes
    – arm : no
    – mips1 : no
    – power : no
    – sparc : no
    – x86 : yes
    – symlinks supported : no
    – junctions supported : yes
    – hardlinks supported : yes

    • Kent Fagerjord November 4, 2016 Leave a Reply

      Hi,

      It might appear so that it won’t build the 64-bit libraries, but it does. I just tested it myself.

      The 64-bit libraries will be placed in boost_1_62_0\stage\x64\lib.

      To build 32-bit and 64-bit DLLs, use these commands instead.

      b2 -j%cores% toolset=msvc-14.0 address-model=64 architecture=x86 link=shared 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=shared threading=multi runtime-link=shared --build-type=minimal stage --stagedir=stage/win32
      

      Kent

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>

*