VS2017 安装编译boost1.71.0 64位静态库
- 下载解压boost1.71.0
- 打开VS2017的x64本机工具命令提示,cd进入boost根目录
- 输入bootstrap.bat
- 编译静态64位支持多线程的boost库(编译参数详见Jamroot文件)
>> b2 --build-type=complete --prefix=F:\boost-1.71.0\ --build-dir=@解压目录\build threading=multi link=static address-model=64
>> b2 install --build-type=complete --prefix=F:\boost-1.71.0\ --build-dir=@解压目录\build threading=multi link=static address-model=64
- 等待5分钟左右,编译结束。
- boost命名规则:
命名规则:
前缀:lib,但在Win32平台,只有静态库有lib前缀
库名称:以boost_开头的库名称,例子中为boost_filesystem
编译器标识:编译该库文件的编译器名称和版本,例子为-vc80
多线程标识:若支持多线程,则使用-mt;否则,不出现多线程标识
ABI标识:标识Boost库的几个编译链接选项
s:static,静态库标识
gd:debug版标识
p:使用STLpor而不是编译器自带的STL
版本号:Boost的版本号,例子为1_40
扩展名:win32平台为.lib,Linux平台为.a或.so