vs2010 安装 boost
来源:互联网 发布:淘宝名气最高的杂货店 编辑:程序博客网 时间:2024/06/12 00:03
1.去www.boost.org下载最新的boost,我下载了boost_1_46_1.7z
2.(我放在E:/cpp目录下)解压到当前文件夹
3.打开VS2010->VS TOOLS->VS命令提示
4.CD E:/cpp/boost_1_46_1
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:/cpp/boost_1_46_1;$(IncludePath)
E:/cpp/boost_1_46_1/stage/lib;$(LibraryPath)
8.运行如下代码测试:
#include <boost/config.hpp>
#include <iostream>
#include <vector>
#include <string>
#include <boost/graph/adjacency_list.hpp>
#include <boost/tuple/tuple.hpp>
enum
family
{ Jeanie, Debbie, Rick, John, Amanda, Margaret, Benjamin, N };
int
main()
{
using
namespace
boost;
const
char
*name[] = {
"Jeanie"
,
"Debbie"
,
"Rick"
,
"John"
,
"Amanda"
,
"Margaret"
,
"Benjamin"
};
adjacency_list <> g(N);
add_edge(Jeanie, Debbie, g);
add_edge(Jeanie, Rick, g);
add_edge(Jeanie, John, g);
add_edge(Debbie, Amanda, g);
add_edge(Rick, Margaret, g);
add_edge(John, Benjamin, g);
graph_traits < adjacency_list <> >::vertex_iterator i, end;
graph_traits < adjacency_list <> >::adjacency_iterator ai, a_end;
property_map < adjacency_list <>, vertex_index_t >::type
index_map = get(vertex_index, g);
for
(boost::tie(i, end) = vertices(g); i != end; ++i) {
std::cout << name[get(index_map, *i)];
boost::tie(ai, a_end) = adjacent_vertices(*i, g);
if
(ai == a_end)
std::cout <<
" has no children"
;
else
std::cout <<
" is the parent of "
;
for
(; ai != a_end; ++ai) {
std::cout << name[get(index_map, *ai)];
if
(boost::next(ai) != a_end)
std::cout <<
", "
;
}
std::cout << std::endl;
}
return
EXIT_SUCCESS;
}
0 0
- boost vs2010安装
- VS2010 Boost编译安装
- vs2010 安装boost
- VS2010 Boost编译安装
- VS2010 Boost编译安装
- VS2010 Boost编译安装
- VS2010编译安装boost
- VS2010 Boost编译安装
- VS2010 Boost编译安装
- VS2010安装boost
- VS2010 Boost编译安装
- vs2010 boost库安装
- BOOST VS2010编译安装
- VS2010安装boost库
- vs2010 安装 boost
- VS2010 Boost编译安装
- VS2010安装Boost库
- VS2010安装boost
- 数学类 - CCPoint操作
- Android 解决 ScrollView 嵌入 HorizontalScrollView 后滑动卡顿问题
- 【分享】基于xposed的关机窃听的demo
- VC内存泄露检查工具:VisualLeakDetector
- isFile()&exists() &isDirectory()
- vs2010 安装 boost
- SBC 功能与部署
- fsdfsfsdf
- jQuery 操作动态加载的html 元素
- Matlab R2012a Unix的安装
- Easyui 中 datagrid 合并单元格的打印问题
- Jquery插件 easyUI属性汇总
- 深入理解Linux文件系统编程(二)
- android状态机statemachine详解