4
votes

I'm looking for a free compiler that can generate a 64-bit Windows binary from code that uses some C++11 features.

Visual C++ Express doesn't ship with a 64-bit compiler. The classic workaround for this is to download the Windows SDK. However, SDK 7 seems to be contemporary with Visual C++ 2010, which doesn't support C++11, and SDK 8 says it doesn't include a compiler at all anymore. I get the impression Microsoft basically just doesn't provide free 64-bit C++ compilers anymore; is this correct?

There have been 64-bit versions of MinGW, though I get the impression they lag somewhat behind the latest GCC; what's the most up-to-date available version?

Are there any other options I'm overlooking?

1
I'm fairly sure that MingW is up to 4.7.2. While that's not 4.8, it is the current stable release. - Nicol Bolas
@DavidHeffernan: I wasn't aware that Clang could be used on Windows. - Nicol Bolas
@Nicol Well, you've learn something today! ;-) - David Heffernan
@DavidHeffernan Oh, I have Visual C++ 2012 installed, but looking at the command line options with cl /?, I don't see any mention of 64-bit. How do you run the 64-bit compiler? - rwallace

1 Answers

8
votes

All of the mainstream compilers that are freely available can meet your needs:

  • VS 2012 Desktop Express ships with an x64 compiler.
  • Mingw is open source and easy enough to build. So you can be as up-to-date as you like if you cannot find a binary distribution that meets your needs.
  • Clang is also open source and what I said above for Mingw applies equally.