BOOST+MSVC10.0环境配置
这个是使用的静态lib 参考:http://www.cnblogs.com/jxgxy/archive/2013/03/11/2954356.html
1. www.boost.org下载最新的boost,我下载了boost_1_5_5_0
2.(我放在E:/Code4Boost目录下)解压到当前文件夹
3.打开VS2010->VS TOOLS->VS命令提示
4.CD E:/Code4Boost/boost_1_55_0
5.输入bootstrap,便生成bjam.exe文件
6.输入bjam toolset=msvc-10.0 variant=debug,release threading=multi link=static,便生成boost库(时间挺长20分钟以上)

7.修改VS2010的参数 在项目的组合显示那找到属性页,打开属性页,选择配置属性,选择VC++目录,设置includepath和libpath,
如我的为E:/Code4Boost/boost_1_55_0;$(IncludePath)
E:/Code4Boost/boost_1_55_0/stage/lib;$(LibraryPath)
测试代码:
// TestBoost.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include <boost/timer.hpp> #include <iostream> using namespace boost; using namespace std; int _tmain(int argc, _TCHAR* argv[]) { timer t; cout<<"Max timespan: "<<t.elapsed_max()/3600<<"h"<<endl; cout<<"Min timespan: "<<t.elapsed_min()<<"s"<<endl; cout<<"Now time elapsed: "<<t.elapsed()<<"s"<<endl; return 0; }

当然可以生成动态dll 或者 搭配STLPort的了
http://www.cnblogs.com/fullsail/archive/2011/10/07/2200948.html
http://blog.csdn.net/ajioy/article/details/7304530

浙公网安备 33010602011771号