VS2008下安装和配置boost

 

    由于在开发C++的程序中使用到正则表达式,用到Boost这个优秀的C++库,记录一下在 VS2008下如何安装和配置boost。

 

    Boost网站www.boost.org下载:boost_1_48_0.zip

  • 开始菜单中选择“Visual Studio 2008 命令提示”打开cmd命令框。
  • 解压boost_1_48_0.zip文件到“L:\boost_1_48_0”目录,cmd到该目录下运行bootstrap.bat,在“L:\boost_1_48_0”下生成bjam.exe等文件。
  • 命令行输入如下内容(以下内容可根据需要更改):
    • bjam stage --build-type=complete --stagedir="L:\boost_1_48_0" --with-filesystem --with-thread --with-date_time --with-program_options --layout=versioned threading=multi toolset=msvc-9.0
    • bjam stage --build-type=complete --stagedir="L:\boost_1_48_0" --with-regex --layout=versioned threading=multi toolset=msvc-9.0
    • bjam --without-python --toolset=msvc-9.0 --prefix=L:\boost_1_48_0 instal
    • 参数说明
        --without-python 表示不使用 python
        --toolset : 所使用编译器,Visual Studio 2008为msvc-9.0
        --prefix:编译后library的安装目录
  • 在VS2008中配置:
    • 工具-选项-项目和解决方案-VC++目录-包含文件下加入:L:\boost_1_48_0
    • 工具-选项-项目和解决方案-VC++目录-库文件下加入:L:\boost_1_48_0\lib

  

   参考

http://www.cnblogs.com/xdotnet/archive/2008/03/22/boost_install_config.html

http://blog.csdn.net/benjiamen/article/details/2643705

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值