为了个array.h搞了两天。vs2005 sp1没有,vs2008 sp1才带了。boost里倒是有。装起来复杂。
1.visual studio 2005 command prompt;
2. cd D:/boost/tools/jam/src
3.运行build.bat,编译bjam
编译完成后,可执行文件位于src/bin.ntx86下
最后要把bjam.exe拷贝到boost根目录d:/boost下
在使用bjam之前,要修改bjam配置文件
boost/tools/build/v2下的user_config.jam
1.修改第57行,去掉前面的#注释,启用msvc8.0
boost里的90%的库是不需要自己编译后再用的。
通过bjam --show-libraries,可以查看必须编译后才能使用的库
bjam --toolset=msvc --with-date_time --build-type=complete stdlib=stlport stage
将只编译date_time库(--without-)
toolset:编译器
build_type:编译类型(默认release模式)
stdlib:要搭配的标准库
stage:使boost使用本地构建
若使用install选项后,默认路径为C:/boost
Include files:
D:/boost/(调到最前面)
Library files:
设置工程属性:
project->properties->configuration properties->general->设置character set ->Not Set
c/c++->code generation->runtime library->/MT or /MTd
网络资料:
http://www.boost.org
http://www.dinkumware.com VC内置stl容器提供商
书本作者:罗剑锋