I recently wanted to get involved in C++0x (Native, OS independent thread support?! Heck yes I want that!), and it seemed as though my compiler supports it. So, I added it in Code::Blocks, under Settings >> Compiler and debugger.. >> Global Compiler Settings >> checked "Have g++ follow the comming C++0x ISO C++ language standard [-std=c++0x]". But, whenever I try to run this simple program;
#include <iostream>
#include <thread>
using namespace std;
void threadFunc();
int main()
{
thread t(threadFunc);
}
void threadFunc()
{
cout << "hello" << endl;
}
Which _should_ work under C++0x, it keeps giving me the error; "error: 'thread' was not declared in this scope", and "error: expected ';' before 't'". While I know full it _should_ work.
Help?