下载boost
前往boost官网下载boost1.68
编译
解压释放到D:\boost1.68.0,使用VS工具运行bootstrap.bat,分别运行下面两个命令,其中address-model表示编译的是32位还是64位库,–stagedir=表示输出目录,link表示编译的是静态库还是动态库,runtime-link表示使用的运行时库是静态链接还是动态链接,threading表示使用的运行时库是多线程版本还是单线程版本。
bjam stage --toolset=msvc-14.1 --without-python address-model=32 --build-type=complete --stagedir="D:\boost1.68.0\bin\vc141_32" link=static runtime-link=static threading=multi debug release
bjam stage --toolset=msvc-14.1 --without-python address-model=64 --build-type=complete --stagedir="D:\boost1.68.0\bin\vc141_64" link=static runtime-link=static threading=multi debug release
也可以不带address-model参数,一次生成64位和32位库
bjam stage --toolset=msvc-14.1 --without-python --build-type=complete --stagedir="D:\boost1.68.0\bin" link=static runtime-link=static threading=multi debug release