环境:
Windows 10, 64bit;Visual Studio 2013(Update 5);Boost 1.62.0
过程:
1,下载Boost 1.62.0.zip
2, 解压Boost到D:\Mylaf\Rebuild\VS2013下面
3,以管理员身份打开CMD,并切换到D:\Mylaf\Rebuild\VS2013\boost_1_62_0,进行如下操作:
3.1 执行.\bootstrap.bat生成bjam.exe,b2.exe。(b2.exe是bjam.exe的升级版本)
3.2 使用b2.exe进行编译
动态库:
.\b2.exe install --prefix="D:\Mylaf\Config\boost_1_62_0" --build-type=complete --without-python --without-mpi --without-metaparse --without-graph --without-graph_parallel --without-program_options --without-wave --witout-type_erasure --without-coroutine --without-coroutine2 toolset=msvc-12.0 link=shared runtime-link=shared threading=multi
静态库:
.\b2.exe install --prefix="D:\Mylaf\Config\boost_1_62_0" --build-type=complete --without-python --without-mpi --without-metaparse --without-graph --without-graph_parallel --without-program_options --without-wave --witout-type_erasure --without-coroutine --without-coroutine2 toolset=msvc-12.0 link=static runtime-link=static threading=multi
编译方式:install 和 stage
intsall: 生成库文件目录lib和头文件目录include。
stage:仅生成库文件目录lib。
...updated 1003 targets...
The Boost C++ Libraries were successfully built!
The following directory should be added to compiler include paths:
D:\Mylaf\Rebuild\VS2013\boost_1_62_0
The following directory should be added to linker library paths:
D:\Mylaf\Rebuild\VS2013\boost_1_62_0\D:\Mylaf\Config\boost_1_62_0\lib
D:\Mylaf\Rebuild\VS2013\boost_1_62_0>
VS2013项目快速(懒人)导入BOOST库lib文件
//
// VS2013项目快速(懒人)导入BOOST库lib文件
// 思路:编写一个#pragma comment(lib,***.lib)的头文件
// Mylaf
//
#ifndef _ME_BOOST_INC_HEADER_
#define _ME_BOOST_INC_HEADER_
//#pragma comment(lib, "libboost_wserialization-vc120-mt-sgd-