编译并使用boost库(win7+boost1.60+vs2013)
来源:互联网 发布:nginx转发配置 编辑:程序博客网 时间:2024/05/16 08:23
下载boost库
从http://www.boost.org上下载到目前最新的boost库,快速传送门:boost_1_60_0.zip
得到源代码之后,使用vs2013的cl.exe编译
进入到源代码目录中
建立编译工具bjam.exe----需要执行bootstrap.bat
指定编译命令
指定msvc版本12.0对应的是vs2013,--stagedir是指定编译后存放的目录
- bjam stage --toolset=msvc-12.0 --without-graph --without-graph_parallel --stagedir="D:\boost\boost_1_60_0\bin\vc12" link=static runtime-link=shared runtime-link=static threading=multi debug release
稍微等一会,库就编译好了……
开始使用boost
首先需要设定文件包含目录:
我的boost库解压在D盘下
设定库目录:
然后建立我们的第一个boost项目,代码如下:
- #include "boost/thread.hpp"
- #include "iostream"
- using namespace std;
- void mythread()
- {
- cout << " hello,thread! " << endl;
- }
- int _tmain(int argc, _TCHAR* argv[])
- {
- boost::function<void()> f(mythread);
- boost::thread t(f);
- t.join();
- cout << " thread is over! " << endl;
- return 0;
- }
这是输出
阅读全文
0 0
- 编译并使用boost库(win7+boost1.60+vs2013)
- 编译并使用boost库(win7+boost1.60+vs2013)
- 编译并使用boost库(win7+boost1.53+vs2012)
- 编译并使用Boost库(Win7+Boost1.53+VS2012)
- 编译并使用Boost库(Win7+Boost1.53+VS2012)
- 编译并使用boost库(win7+boost1.63+vs2015+32位or 64位)
- 编译并使用boost库(win7+boost1.63+vs2015+32位or 64位)
- 编译使用boost库(win7+boost1.53+vs2012)
- Boost编译和配置教程(Win10+VS2013+Boost1.60.0)
- VS2013编译boost1.56.0
- vs2013 boost1.6编译
- vs2013编译boost库
- vs2013编译boost库
- boost库 win7 vs2013安装
- VS2013编译安装Boost1.55
- vs2013下boost1.57编译
- 编译boost库-用vc2005编译boost1.33.1
- 编译boost库-用vc2005编译boost1.33.1
- i am a student.转为student. a am i
- 存储管理-操作系统-程序员面试
- python进程池的复习
- 使用Docker搭建Struts2-048漏洞环境及Python PoC验证
- loadrunner录制有很多无关脚本应该怎样设置?
- 编译并使用boost库(win7+boost1.60+vs2013)
- 131_容器_HashTable与Properties_绝对相对类路径存储与读取
- 集训8.7
- G
- 大数据学习、一
- ActiveMQ的集群方案对比及部署
- SpringBoot16-springboot的Web开发-Spring Boot的Thymeleaf支持
- [jzoj5236]【NOIP2017模拟8.7A组】利普希茨
- [双连通分量]LA5135 Mining your own business