Boost 1.48.0编译成VS2008版本

来源:互联网 发布:java结果保留两位小数 编辑:程序博客网 时间:2024/04/29 20:32

1. 至http://www.boost.org/users/history/version_1_48_0.html下载boost最新版1.48.0;

2. 解压缩后,运行bootstrap.bat批处理文件,得到bjam.exe;

3. 进入VS2008的Command Prompt (方法:Tools -> Visual Studio 2008 Command Prompt),转到boost目录。(例如,我的boost目录:D:\boost_1_48_0)

4. 输入“bjam --toolset=msvc-9.0 --build-type=complete stage”后,等待约1小时,完成编译。编译成的lib文件,放在stage\lib下,形如“libboost_program_options-vc90-sgd-1_48.lib”.

备注:对于一般使用,可以选择编译boost库(毕竟完整编译需要时间还是比较长的),例如我一般编译如下几个boost常用库system, thread, date_time, filesystem, serialization,则相应的bjam命令如下:

bjam --toolset=msvc-9.0 architecture=x86 address-model=64 --with-system --with-thread --with-date_time --with-filesystem --with-serialization


其中:msvc-9.0代表编译成VC9.0(即VS2008)版本,对应的msvc-10.0代表编译成VC10.0(即VS2010)版本; address-model=64代表编译成64位版本,如省略此项,默认为编译成32位版本。


早期版本编译参考:(bjam命令可复用)

1_47_0: http://blog.csdn.net/great3779/article/details/6654780 

1_46_0: http://blog.csdn.net/great3779/article/details/6454663



转自:http://blog.csdn.net/great3779/article/details/6977922

0 0
原创粉丝点击