Possible Duplicate:
C++11 threading on Windows
The title pretty much describes it, I'm trying to use the following code:
#include <thread>
#include <iostream>
using namespace std;
void task_1(){
cout << "Thread 1" << endl;
}
int main(){
thread task(task_1);
task.join();
return 1;
}
but it gives a compiler error
D:\dev\cpp\trash\thread.cpp|11|error: 'thread' was not declared this scope|
I'm using Code:Blocks 10.05 with GNU GCC compiler, with option -std=c++0x
Code:Blocks was just recently downloaded so I would guess that everything should be up to date.