Boost库单元测试使用配置

Boost库单元测试使用配置


1 Boost库简介
Boost官网:http://www.boost.org/。
中文简介见百度百科:http://baike.baidu.com/view/663725.htm。
Boost库是一个可移植、提供源代码的C++库,作为标准库的后备,是C++标准化进程的发动机之一。
Boost中比较有名气的几个库:

  • Regex 正则表达式库。
  • Pool 内存池管理。
  • smart_ptr 5个智能指针,学习智能指针必读。

Boost学习书籍《Boost程序库完全开发指南》。

2 下载源文件
版本:Boost 1.48.0
地址:http://sourceforge.net/projects/boost/files/boost/1.48.0/


3 Bjam工具生成
参考:http://blog.csdn.net/great3779/article/details/6977922/
编译器:vs2005。


解压源文件到D:\boost_1_48_0
运行D:\boost_1_48_0\bootstrap.bat,生成bjam.exe。

4 编译Boost.test模块
Boost.test为单元测试模块,其他模块编译方式相同。
Test: Support for simple program testing, full unit testing, and for program execution monitoring, from Gennadiy Rozental.


静态库生成命令:bjam stage --toolset=msvc-8.0 --with-test link=static debug release
动态库生成命令:bjam stage --toolset=msvc-8.0 --with-test link=shared debug release


默认生成位置:
include paths:D:/boost_1_48_0
library paths:D:\boos
  • 3
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值