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
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.