vs2015 编译boost库

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

扫描二维码关注公众号,回复: 9466109 查看本文章

注意:你自己的路径\boost_1_66_0\newbuild是自定义的目录,此目录存放编译成功的静态库

用法:需要在项目属性中设置如下图

 

 

猜你喜欢

转载自www.cnblogs.com/alinh/p/12377980.html