编译 boost 1.46 with vc2010

注意,内容参考Ididcan的CSDN Blog,修改为最新的Boost1.46.1

-------------------

下载安装包boost 1_46_1
http://sourceforge.net/projects/boost/files/boost/1.46.1/

以下假设解压缩到D:\

1.编译bjam
 
  (1)进入Visual Studio 2010 commandprompt(单击“开始”按钮,指向“所有程序”,指向“Microsoft Visual Studio 2010”,指向“VisualStudio tools(工具)”,然后单击“Visual Studio 2010 commandprompt(命令提示)”
(2)cd 到 D:\boost_1_46_1\tools\build\v2\engine\src 执行build.bat,之后在D:\boost_1_46_1\tools\build\v2\engine\src\bin.ntx86下生成bjam.exe,
(3)将bjam.exe复制到D:\boost\boost_1_46_1\下。

2.编译环境设定 
  修改user-config.jam(d:\boost\boost_1_43_0\tools\build\v2\user-config.jam)的MSVCconfiguration,加入红色字体
  # -------------------
# MSVC configuration.
# -------------------

# Configure msvc (default version, searched for in standardlocations and PATH).
# using msvc ;

# Configure specific msvc version (searched for in standardlocations and PATH).
# using msvc : 8.0 ;

using msvc : 10.0 : :<compileflags>/wd4819<compileflags>/D_CRT_SECURE_NO_DEPRECATE<compileflags>/D_SCL_SECURE_NO_DEPRECATE<compileflags>/D_SECURE_SCL=0;

3.CD D:\boost_1_46_1\ ,进入D:\boost_1_46_1\
编译boost库,输入
bjam --without-python --toolset=msvc-10.0 --build-type=complete--prefix="d:\boost\boost_1_43_0" stage
bjam --without-python --toolset=msvc-10.0 --build-type=complete stage


编译完成后
安装,输入:
bjam --with-python --toolset=msvc-10.0 --build-type=complete--prefix="d:\boost\boost_1_43_0" install

之后在VS2010中配置VC++目录即可

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值