C++11 on Windows (Hah!)

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.

3 thoughts on “C++11 on Windows (Hah!)”

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

  2. I am a professional developer and, probably more importantly, a developer for the open source Csound software sound synthesis system. I am the maintainer of the Windows installer for this system which has many third party dependencies and some GUI “front ends.” Csound itself is written in C but has a number of C++ components, many of them contributed by me.

    I have used a number of Windows toolchains over the years. For the past few months I have been using the current Qt SDK (5.3.0) with self-contained installation of MinGW 4.8.2, 32 bit CPU architecture, supplemented with the MSys shell, autotools, etc. So far, this appears to be working well. I use lambdas and other C++11 features.

Leave a Reply

Your email address will not be published. Required fields are marked *