首先下载boost1.76.0并解压。https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/
打开cmd命令行模式,进入解压好的文件目录。
编译32位
REM vs2019编译64位 如果vs2017下面的vc142替换为vc141(特殊:--toolset=msvc-14.1)
CALL bootstrap vc142
CALL b2 stage --build-dir=build/vc14_32 --toolset=msvc-14.2 address-model=32 --without-python --stagedir=vc14/32 link=static runtime-link=shared runtime-link=static threading=multi debug release -j 12
编译64位
REM vs2019编译64位 如果vs2017下面的vc142替换为vc141(特殊:--toolset=msvc-14.1)
CALL bootstrap vc142
CALL b2 stage --build-dir=build/vc14_64 --toolset=msvc-14.2 address-model=64 --without-python --stagedir=vc14/64 link=static runtime-link=shared runtime-link=static threading=multi debug release -j 12