centos6.5安装boost
2015-10-15 19:24
549 查看
1、解压boost_1_58_0.tar.bz2
tar -vxf boost_1_58_0.tar.bz2
2、编译
cd boost_1_58_0
./bootstrap.sh
这里会生成两个文件bjam和b2,这两个是一样的
3、./b2 install
测试安装是否成功
#include<iostream>
#include<boost/bind.hpp>
using namespace std;
using namespace boost;
int fun(int x,int y)
{
return x + y;
}
int main(){
int m=1;
int n=2;
cout << boost::bind(fun,_1,_2)(m,n) << endl;
return 0;
}编译、链接命令:g++ test.cpp -o test
tar -vxf boost_1_58_0.tar.bz2
2、编译
cd boost_1_58_0
./bootstrap.sh
这里会生成两个文件bjam和b2,这两个是一样的
3、./b2 install
测试安装是否成功
#include<iostream>
#include<boost/bind.hpp>
using namespace std;
using namespace boost;
int fun(int x,int y)
{
return x + y;
}
int main(){
int m=1;
int n=2;
cout << boost::bind(fun,_1,_2)(m,n) << endl;
return 0;
}编译、链接命令:g++ test.cpp -o test
相关文章推荐
- 从源码安装Mysql/Percona 5.5
- 在 AppImage、Flathub 和 Snapcraft 平台上搜索 Linux 应用
- 在Windows平台下使用安装GCC(图)
- 解决vc中unable to connect to the MKS:Internal error问题
- boost相关小知识(长期顶置更新)
- 杰奇一些安装详细说明文件,比官方更细
- 无线网卡安装DIY
- 网卡安装常见问题精解
- DB2数据库的安装
- CentOS下DB2数据库安装过程详解
- ghost安装系统软件硬盘安装器 安装ghost图文教程
- CentOS 6.3下编译安装Ruby 2.0笔记
- FREEBSD安装POSTGRESQL笔记
- Redis总结笔记(一):安装和常用命令
- FreeBSD 6.2 安装全程图解教程
- 安装Apache和PHP的一些补充
- Lua在windows下的安装及环境配置
- PHP 5.3.0 安装分析心得
- 关于MSSQL 2005的安装与补丁
- sql2008安装教程 SQL Server 2008 R2 安装图解