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.64 with Visual Studio 2017
– Building Boost 1.62 with Visual Studio 2015
– Boost 1.58 for 32-bit and 64-bit architectures with Visual Studio 2013
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.
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.
*
Thaks for this…Should there be an “s” in the library name??
libboost_serialization-vc140-mt-s-1_60.lib
Hi @matt:
That “s” means the library is statically linked.
Have a look at this page for information on what those letters mean:
http://www.boost.org/doc/libs/1_61_0/more/getting_started/windows.html#id46
With Visual Studio, boost use automatic linking of libraries. You only have to tell the linker where to look for libraries (Additional Library Paths).
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?
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).Thank you, again!
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:
Never mind. I missed it. the boost directory is next to .bat file. Thanks.