Download
Download the BOOST_1_61_0 via the boost official website or directly at Source Forge.
Optional packages
Zlib Library, environment variable: zlib_source
BZIP2, environment variable: bzip2_source
ICU i18n, environment variable have_icu=1, Icu_path
Expat, Environment variables: expat_include (header file contains directory) and Expat_libpath (library directory)
Compiling boost on Windows
After downloading the boost source file compression package, create the BOOST-SRC directory and extract the source files to this directory. Assuming you want to install boost to the Boost-dir directory, the Boost-build directory is the intermediate temporary file. Perform the following steps at the command line:
1. Initialize the 32-bit VC compilation environment:
"C:\Program Files\Microsoft Visual Studio 14.0\vc\vcvarsall.bat" x86
2. For 32-bit Visual Studio installed on 64-bit operating systems, Visual Studio is typically installed in C:\Program Files (x86):
"C:\Program Files (x86) \microsoft Visual Studio 14.0\vc\vcvarsall.bat" x86
3. Generate Boost Compilation system:
CD/D DRIVE:\PATH\TO\BOOST-SRC
Bootstrap.bat
4. If you want to generate a 64-bit boost library, initialize the 64-bit VC + + compilation Environment:
"C:\Program Files\Microsoft Visual Studio 14.0\vc\vcvarsall.bat" X86_amd64
5.32-bit visual Studio installed on 64-bit operating systems:
"C:\Program Files (x86) \microsoft Visual Studio 14.0\vc\vcvarsall.bat" X86_amd64
6. Unzip the bzip2 and Zlib source compressed package, and prepare the directory of the annotated pressure.
7. Compile and install the 32-bit library,
B2 Install--libdir=boost-dir\libs--includedir= boost-dir\include--build-dir=boost-build--layout=tagged variant= Debug,release Threading=multi link=shared runtime-link=shared-szlib_source=<zlib-src-dir>-sBZIP2_SOURCE= <bzip2-src-dir>
8. Compile and install the 64-bit library:
B2 Install--libdir=boost-dir\libs64--includedir= boostdir\include--build-dir=boost-build64--layout=tagged variant =debug,release threading=multi link=shared runtime-link=shared address-model=64–szlib_source=<zlib-src-dir>- Sbzip2_source=<bzip2-src-dir>
Boost1.61+win7+vc2015 compilation