-
1、下载
Boost 1.70.0 下载地址:
https://dl.bintray.com/boostorg/release/1.70.0/binaries/
我选择的是boost_1_70_0-msvc-14.0-64.exe -
2、解压
将boost_1_70_0-msvc-14.0-64.exe解压 -
3、安装
找到VS2015的Visual Studio Tools,打开“VS2015 x64本机工具命令提示符”:
在提示符窗口中,切换到boost源代码文件夹中,然后输入bootstrap.bat:
这步完成后会有个提示,如下:
然后按照提示,运行b2.exe(可以在文件夹中找到它,然后双击)。
后面就是漫长的编译过程啦,至少需要二十来分钟,过程就不贴了。
到这里boost的编译就完成了,要在项目中使用它,还需要配置一下。
– 注意:有的博客在bootstrap.bat后,在提示符窗口中输入
bjam stage --toolset = msvc - 14.0 architecture = x86 address - model = 64 --without - graph --without - graph_parallel --stagedir = "E:\boost\boost_1_70_0\bin\vc14-x64" link = static runtime - link = shared runtime - link = static threading = multi debug release
但我的电脑无法正常编译,会爆出很多not found的notice,所以抛弃了那种方法。不知其他小伙伴遇到过没?求解答~
- 4 项目配置
项目属性右击,C/C++ —常规—附加包含目录 选择boost所在的根目录。
链接器 —常规—附加库目录,添加stage下的lib
完事。