Win10 VS2013编译Boost 1.62.0

环境:

Windows 10, 64bit;Visual Studio 2013(Update 5);Boost  1.62.0

过程:

1,下载Boost 1.62.0.zip

2, 解压Boost到D:\Mylaf\Rebuild\VS2013下面

3,以管理员身份打开CMD,并切换到D:\Mylaf\Rebuild\VS2013\boost_1_62_0,进行如下操作:

 3.1 执行.\bootstrap.bat生成bjam.exe,b2.exe。(b2.exe是bjam.exe的升级版本)

 3.2 使用b2.exe进行编译

动态库:
.\b2.exe install --prefix="D:\Mylaf\Config\boost_1_62_0" --build-type=complete --without-python --without-mpi --without-metaparse --without-graph --without-graph_parallel --without-program_options --without-wave --witout-type_erasure --without-coroutine --without-coroutine2 toolset=msvc-12.0 link=shared runtime-link=shared threading=multi
静态库:
.\b2.exe install --prefix="D:\Mylaf\Config\boost_1_62_0" --build-type=complete --without-python --without-mpi --without-metaparse --without-graph --without-graph_parallel --without-program_options --without-wave --witout-type_erasure --without-coroutine --without-coroutine2 toolset=msvc-12.0 link=static runtime-link=static threading=multi

  编译方式:install 和 stage

  intsall: 生成库文件目录lib和头文件目录include。

  stage:仅生成库文件目录lib。


 3.3 使用b2.exe进行编译

...updated 1003 targets...


The Boost C++ Libraries were successfully built!

The following directory should be added to compiler include paths:

    D:\Mylaf\Rebuild\VS2013\boost_1_62_0

The following directory should be added to linker library paths:

    D:\Mylaf\Rebuild\VS2013\boost_1_62_0\D:\Mylaf\Config\boost_1_62_0\lib


D:\Mylaf\Rebuild\VS2013\boost_1_62_0>


VS2013项目快速(懒人)导入BOOST库lib文件

//
// VS2013项目快速(懒人)导入BOOST库lib文件
// 思路:编写一个#pragma comment(lib,***.lib)的头文件
// Mylaf
//

#ifndef _ME_BOOST_INC_HEADER_
#d
  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值