编译 boost

不想深究,只是可以编译出想要的lib文件

1.打开visual studio 2012 命令提示

2.进入 boost目录

3.运行booststrp.bat得到b2.exe、bjam.exe、project-config.jam文件

4.运行命令

多线程调试 DLL (/MDd)

bjam stage --with-date_time --toolset=msvc-11.0 --build-type=complete link=static runtime-link=shared threading=multi debug

以上命令编译出 libboost_date_time-vc110-mt-gd-1_62.lib

注:runtime-link=shared表示是c++运行库是DLL即MDd或MD

f:setupoost_1_62_0>bjam stage --with-locale --toolset=msvc-12.0 --build-type=complete link=static runtime-link=static threading=multi release

以上命令编译出的文件为libboost_locale-vc120-mt-s-1_62.lib 对应vs 编译的 MT

要编译64位的要加上 address-model=64 

原文地址:https://www.cnblogs.com/zhangdongsheng/p/6368355.html