tags:

views:

462

answers:

3

How can you get a recent release, i.e. 4.2+, of g++/gcc for windows? Mingw's standard g++ is 3.4.5 which is 3 years old, released Nov 2005. Mingw have a 4.2 version but this is only in the Alpha stage. I cannot find a stable recent release of g++ for windows, surely I must be missing something.

+4  A: 

Use Cygwin. The full package list includes gcc4-g++, and the latest version there is 4.3.2-1, which should suit your needs.

tgamblin
+8  A: 

Twilight Dragon Media track and regularly release GCC releases usable for MinGW environments.

The current release is based on GCC 4.3.2.

The packages can be downloaded here. I've started using the 4.3.2-TDM1 release in production after testing it extensively for over two months. The only iffy thing I hit is cross-DLL exceptions in C++, but C++ exceptions have been broken in MinGW for ages and most of our code doesn't use them anyway, or ar least doesn't use them across library boundaries.

There's a more recent release available (4.3.2-TDM2, been out for a couple of days). The release notes say it "differs from the first only in two bugs that have been fixed -- one related to temporary files and one related to header paths. A new TDM/MinGW installer has been released concurrently." Haven't tested it yet, though.

Edit: 4.3.3-TDM1 appears to be stable so far - haven't come across any errors in pre-production use. After having tested it exensively, I can recommend 4.3.2-TDM2 for production use.

Mihai Limbășan
+1  A: 

You can get a MinGW distro that uses gcc 4.3.3 here - I've played with it but not used it in anger. It comes complete with boost and several other useful libraries

anon