C++11 on Windows (Hah!)

by Chad Austin on February 22nd, 2013

For it being 2013 and as much as Herb Sutter has talked about C++11, it’s surprisingly hard to get an off-the-shelf C++11 development toolchain on Windows, at least as of today.  By off-the-shelf I mean suitable for an engineering team to get up and running quickly. Of course I could perform unnatural acts and compile my own packages of whatever, but no thanks.

Cygwin runs gcc 4.5 which is too old for most C++11 features.  Cygwin does provide a clang 3.1 package, but it uses the gcc 4.5 libstdc++ headers, lacking most of C++11’s standard library.

I could attempt to compile my own libcxx but libcxx is only known to work on Mac OS X.

In November, Microsoft released a Community Technology Preview increasing Visual Studio 2012’s C++11 support but it requires modifying your project to use the CTP toolchain. I’m using SCons and I have no idea how to convince it to use the CTP.

MinGW offers gcc 4.7 and, in theory, complete C++11 support, but a known bug disables std::to_string.  At least until gcc 4.8.

Blah. I think I’ll abandon Windows for development and focus on Mac and Linux until this situation has improved.

One Response to “C++11 on Windows (Hah!)”

  1. Alessandro Stamatto Says:

    The status of C++11 on windows is horrible indeed…

    Right now I’m using Rubenv gcc 4.8 for windows (http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/rubenvb/gcc-4.8-unstable/).

    It works great in most cases (I compiled boost with it), but still there’s a lot of problems (I had a very hard time compiling other packages).

    And to make things worse most Windows projects only offer pre-compiled for Visual Studio, so… It’s basically visual studio or nothing.

    And Visual Studio is waaayyy behind in C++11. Maybe the next release will be usabe.

Leave a Reply