Code blocks error: 'thread' is not a member of 'std'|
来源:互联网 发布:音频编辑软件for mac 编辑:程序博客网 时间:2024/05/20 15:13
代码:
#include<iostream>#include<thread>using namespace std;void hello(){ cout<<"hello kitty"<<endl;}int main(){ std::thread t(hello); t.join(); return 0;}
错误原因:
没有c++11线程库支持
解决方法:
<1>从下面网站下载threads-posix 支持
http://sourceforge.net/projects/mingwbuilds/files/host-windows/releases/4.8.1/64-bit/threads-posix/sjlj/
<2>覆盖在MinGW目录下
<3>设置编译器为 x86_64-w64-mingw32-g++.exe 即可
<4>重启code blocks
结果:
0 0
- Code blocks error: 'thread' is not a member of 'std'|
- linux下编译c++程序遇到 error: ‘thread’ is not a member of ‘std’的错误
- Blitz++ error: 'labs' is not a member of 'std'
- error C2039: 'wstring' : is not a member of 'std'(转)
- error C2039: 'bitset' : is not a member of 'std'
- error C2039: 'min' : is not a member of 'std'
- : error: ‘cout’ is not a member of ‘std’
- 'find_if’ is not a member of ‘std'
- 'numeric_limits' is not a member of 'std'|
- 'numeric_limits' is not a member of 'std'
- vc++ .net std::string is not a member of std
- shared_ptr.hpp(321) : error C2039: 'type_info' : is not a member of 'std' 错误修正
- VS2005 VS2010 error C2039: back_inserter : is not a member of std
- C++11 error: ‘sleep_for’ is not a member of ‘std::this_thread’
- 平日小问题 (2):[Error] 'setprecision' is not a member of 'std'
- error: ‘to_string’ is not a member of ‘std’———已解决
- LabelReader.cpp:54:9: error: 'transform' is not a member of 'std'
- Dev-C++ “to_string is not a member of std” error- 已解决
- Protoolkit中如何才能使用ProUtil函数
- poj 1328 Radar Installation
- poi 3.9 Range发现一个bug
- linux下libxml2库的使用说明
- ------Java基础强化------适合初学者
- Code blocks error: 'thread' is not a member of 'std'|
- P6spy sql跟踪使用
- Hadoop Mapreduce从零开始
- hdu1969
- 设置了error_reporting(E_ALL)还是不显示错误
- HDU 4255 A Famous Grid
- 交大OJ 2113题
- 扩展欧几里得算法
- java一个多线程的经典例子