1、下載boost官網安裝包。
https://dl.bintray.com/boostorg/release/1.66.0/binaries/
注意:這里一定要選擇好boost版本
如: boost_1_66_0-msvc-14.0-64.exe 14.0對應vs2015 64:64位
2、下載后解壓。
3、找到 開始->所有程序->visual studio 2015 ->vs2015 x64 本機工具命令提示符 打開。
4、cd到解壓的目錄,運行 .\bootstrap.bat; 等待 在該目錄下會生成 bjam.exe
5、接着輸入
bjam stage --toolset=msvc-14.0 architecture=x86 address-model=64 --without-graph --without-graph_parallel --stagedir="你自己的路徑\boost_1_66_0\newbuild" link=static runtime-link=shared runtime-link=static threading=multi debug release
bjam stage --toolset=msvc-14.0 architecture=x86 address-model=32 --without-graph --without-graph_parallel --stagedir="你自己的路徑\boost_1_66_0\newbuild" link=static runtime-link=shared runtime-link=static threading=multi debug release
注意:你自己的路徑\boost_1_66_0\newbuild是自定義的目錄,此目錄存放編譯成功的靜態庫。
用法:需要在項目屬性中設置如下圖