Is there anyway to use std::thread with C++11 standard library in windows when compiling with g++ 4.5.2 in MinGW?
I’m going assume no as I’ve seen many things saying you have to compile with the pthreads option but I figure I’d ask anyway.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There is experimental support for
std::threadin for MinGW-w64 toolchains.Specifically, my GCC 4.6 builds provide usable
std::threadthrough MinGW-w64’s winpthreads library.You can find downloads here:
Apart from that, MSVC11 (Visual Studio 2012) has
<thread>,<chrono>, and<atomic>. You can download the Express edition here.