Reputation: 37427
I created a program in C++2011 that actually uses features of C++2011: mutex
, unique_lock
, condition_variable
, future
and async
.
I've tested it on Debian Linux 64 bits box, and it compiles and runs like a charm.
Now, I want to compile it for Windows.
I tried Visual C++ Express 2010, but it does not have support for the new features of C++. (The Beta for Visual C++/Studio 2012 only runs on Windows 8.)
I tried cross compiling with mingw-g++ (4.6), but it looks like these new features are not supported for the Windows target. (Although they are supported for g++-4.6 for Linux target).
Is there any (free?) solution as of today to compile a C++2011 program for Windows target?
Upvotes: 5
Views: 371
Reputation: 68561
My (commercial) Just::Thread library provides std::thread
, std::mutex
and friends for MSVC 2005/2008/2010 and the TDM port of mingw-gcc 4.5/4.6 on Windows. It's not free, though.
Alternatively, look for a build of gcc 4.7 for mingw. Support for the thread library on Windows is supposed to be available out-of-the-box with gcc 4.7, but it's not officially released yet.
Upvotes: 6
Reputation: 82
I have not tried it yet, but this quote from the project site sounds promising:
"Builds support the following technologies:
OpenMP
LTO
Graphite
std_threads
std_atomics
..."
http://code.google.com/p/mingw-builds/
hope this helps
Upvotes: 3