I followed the instruction here on setting up CodeBlocks to use GCC 4.7.1 .the sample provided at the page i mentioned is compiled just fine,But when i tried to compile the
Try MinGw builds:
http://sourceforge.net/projects/mingwbuilds/
This installer will allow you to choose whatever MinGW you want and also includes c++11
thread functionality.
With mingw, the thread support of gcc depends on which build you get. Some builds don't support threads, others do.
I believe that the mingw build at http://code.google.com/p/mingw-builds/downloads/list supports threads.
MinGW simply won't compile with '-std=c++0x'. Strange enough, '-std=gnu++0x' works.