1.下载MINGW4.9。先从网站http://www.mingw.org/上下载在线安装器(页面右边有DOWNLOAD INSTALLER按钮)。
2.我是WIN7的64位机子,选择下面这种配置:(如果不用POSIX而选WIN32反而用不了)

3.装好后配置CODEBLOCKS:


4.写个程序运行一下:
#include <thread>
#include <iostream>
using namespace std;
void hello()
{
cout<<"Hello from thread"<<endl;
}
int main()
{
thread t1(hello);
t1.join();
cout<<"Main Thread"<<endl;
return 0;
}
