centos(x86 64位系统)使用boost过程
来源:互联网 发布:maya软件下载 编辑:程序博客网 时间:2024/06/04 20:45
1. 安装gcc,g++,make等开发环境
yum groupinstall
"Development Tools"
2. 安装boost
yum install boost boost-devel boost-doc
注意:默认的安装路径在/usr/lib64目录下
3. 例子
4. makefile
- #include <boost/thread.hpp>
- #include <iostream>
- void task1() {
- // do stuff
- std::cout << "This is task1!" << std::endl;
- }
- void task2() {
- // do stuff
- std::cout << "This is task2!" << std::endl;
- }
- int main (int argc, char ** argv) {
- using namespace boost;
- thread thread_1 = thread(task1);
- thread thread_2 = thread(task2);
- // do other stuff
- thread_2.join();
- thread_1.join();
- return 0;
- }
g++ -I./inlcude -L./usr/lib64 asio_thread.cpp -lboost_thread-mt -o example
注意:默认的安装路径在/usr/lib64目录下
5.结果
This is task2!This is task1!
0 0
- centos(x86 64位系统)使用boost过程
- centos(x86 64位系统)使用boost过程
- CentOS 6.5 64位系统OpenSips 1.11编译过程
- Linuxmint13 / Ubuntu12.04 x86-64位 系统使用 WINE/winetricks 安装32位 IE7 + CAJViewer7 阅读器
- win8 64位系统编译boost
- centos x64系统下的boost编译和使用
- x86程序读取64位系统注册表失败解决方案
- Window系统64位下的x86文件夹
- 64位系统下 使用32位 库的配置过程
- LINUX-CENTOS 6.4 64 位 系统安装
- inux系统为Centos 64位
- 【Boost库初探】Boost.Regex库编译、使用(32位/64位)
- Boost使用过程
- CentOS 查看系统是32位还是64位
- 查看centos系统内核版本,32位还是64位
- 64位CentOS系统中安装32位开发库
- CentOS 64位系统中安装32位开发库
- 64位CentOS系统中安装32位开发库
- Cookie
- char,varchar,varchar2,nchar……区别
- hdu1556解题报告
- 如何控制文本框的字符类型
- JAVA中重写equals()方法为什么要重写hashcode()方法?
- centos(x86 64位系统)使用boost过程
- 一些算法问题(转载)
- NSURLConnection 不响应Delegate方法
- 程序签名,传感器,地图,推送
- Android M新控件之FloatingActionButton,TextInputLayout,Snackbar,TabLayout的使用
- C++ 如何控制浮点数的位数
- Android在string.xml中声明xliff:g字符串
- IO7 和IOS8 弹出透明模态窗体
- 关于jquery的html() val() text()区别用法