c++11 and multi-threading

HI! I'm on an old computer running windows XP and I'm trying to check out the new multi-threading features of c++11, but Code::Blocks doesn't recognize the <thread> header file... is it my compiler, or do you have any suggestions on how I should proceed?

Thanks,
AeonFlux
I did have this problem. The reason is that due to gcc not having support for multithreading yet, the Win32 thread build of MinGW doesn't appear to support threading either. If you still want to try multithreading with MinGW, you would have to build MinGW as the POSIX-threads version.

Alternatively, you could probably download one at http://sourceforge.net/projects/mingwbuilds/, and then selecting the POSIX thread model.

Hope this helps!
I downloaded the latest version of MinGW (the 32bits version, not the 64) and plugged it to Code::Blocks, and it seems to work!

I only tried std::thread::hardware_concurrency() though, but it reflected the resources of my computer, so I guess the whole <thread> header works as well... :-)

AeonFlux
There's also 2 other compilers based on GNU GCC:

RubenVB's experimental 4.8.1 std-thread version
&
TDM GCC

TDM supports threads as of a recent update.
closed account (S6k9GNh0)
There's also boost::thread which is mostly a portable non-optimized version of std::thread.
yes TDM GCC is the one I tried with code::blocks
Topic archived. No new replies allowed.