[C++] VS2008下Boost库的编译安装
2014-02-27 23:55
483 查看
下载
进入http://www.boost.org/,下载最新的源码包,我用的版本是1.55.0。
解压
将其解压,我的解压目录是“D:\Program\open\boost_1_55_0”。
编译
打开VS2008,选择“Tools”(工具)->“Visual Studio 2008 command prompt”(命令提示),进入命令行界面。
进入到“D:\Program\open\boost_1_55_0”,执行“bootstrap.bat”进行引导。
引导成功之后在相同目录下会生成bjam.exe。执行如下命令进行编译:
bjam stage --toolset=msvc-9.0 --without-graph --without-graph_parallel --without-math --without-mpi --without-python --without-serialization --without-wave --stagedir="D:\Program\open\boost_1_55_0\bin\vc9" link=static runtime-link=shared runtime-link=static threading=multi debug release
注:编译需要点时间,可以喝杯茶抖抖腿。:)
配置VS2008
选择“Tools”(工具)->“Options”(选项)->“Projects and solutions”(项目和解决方案)->“VC ++ directories”(VC++目录)。
配置Include(包含文件)目录如下:
配置Library(库文件)目录如下:
测试
参考
http://www.cnblogs.com/ComputerG/archive/2011/03/10/1979730.html
(完)
进入http://www.boost.org/,下载最新的源码包,我用的版本是1.55.0。
解压
将其解压,我的解压目录是“D:\Program\open\boost_1_55_0”。
编译
打开VS2008,选择“Tools”(工具)->“Visual Studio 2008 command prompt”(命令提示),进入命令行界面。
进入到“D:\Program\open\boost_1_55_0”,执行“bootstrap.bat”进行引导。
引导成功之后在相同目录下会生成bjam.exe。执行如下命令进行编译:
bjam stage --toolset=msvc-9.0 --without-graph --without-graph_parallel --without-math --without-mpi --without-python --without-serialization --without-wave --stagedir="D:\Program\open\boost_1_55_0\bin\vc9" link=static runtime-link=shared runtime-link=static threading=multi debug release
注:编译需要点时间,可以喝杯茶抖抖腿。:)
配置VS2008
选择“Tools”(工具)->“Options”(选项)->“Projects and solutions”(项目和解决方案)->“VC ++ directories”(VC++目录)。
配置Include(包含文件)目录如下:
配置Library(库文件)目录如下:
测试
#include <iostream> #include <boost/thread/thread.hpp> using namespace std; void printBook() { cout << "1984 - George Orwell" << endl; } int main() { boost::thread myThread(&printBook); myThread.join(); return 0; }
参考
http://www.cnblogs.com/ComputerG/archive/2011/03/10/1979730.html
(完)
相关文章推荐
- 【C++】Vs2008环境下安装编译boost库
- VS2008下Boost库的安装编译
- VS2008下Boost库的安装编译
- Mac上编译安装运行c++ boost库简单步骤
- VS2008下Boost库的安装编译
- C/C++代码静态检查工具Cppcheck在VS2008开发环境中的安装配置和使用
- VS2008下安装和使用BOOST库boost-1_54
- Ubuntu终端命令安装OpenCV(非Cmake方法)(终端gun编译opencv c/c++程序)
- C++ VS2008编译选项
- boost库编译安装调试
- win7下vs2010编译boost库及安装配置方法
- vs2008命令行编译C/C++程序
- VS2008下安装和使用BOOST库boost-1_54
- 在未安装VS2005的机器上运行VS2005编译的C++程序
- Ubuntu下安装配置NDK、独立交叉编译工具编译C/C++程序
- EPD中已自带Mingw,如何安装c++ boost库?
- 安装boost库 配置vs2008
- Ubuntu下boost库编译安装
- ubuntu下编译安装boost库 (改写部分细节版)
- Linux编译和安装boost库