MinGW Distro - nuwen.net

Wisdom Like Silence

Download

My MinGW distribution is currently based around GCC 4.4.1. Choose one of the following:

mingw-5.0.zip (33.6 MB) : If this is your first time installing this distribution.

mingw-5.0.tar.bz2 (24.9 MB) : If you already have tar and bzip2.

mingw-5.0.7z (20.2 MB) : If you already have 7-Zip.

Contents

The components of this distribution fall into five categories:

Essentials Libraries Utilities Utilities (Binary) Other Utilities
binutils 2.20 Boost 1.41.0 bzip2 1.0.5 7-Zip 4.65 jpegtran 7
gcc 4.4.1-nuwen* freetype 2.3.11 grep 2.5.4 diff 2.7 pngcheck 2.3.0
mingw-runtime 3.17 GLee 5.4 gzip 1.3.13 factor 1.13 pngcrush 1.7.6
w32api 3.14 libbzip2 1.0.5 make 3.81 20090914 sha1sum 2.1 pngrewrite 1.3.0
libjpeg 7 patch 2.6.1 sort 2.1 vorbis-tools 1.2.0
libogg 1.1.4 sed 4.2.1 split 2.1
libpng 1.4.0 wget 1.12 tar 1.12
libvorbis 1.2.3 uniq 2.1
SDL 1.2.14 upx 3.04
SDL_mixer 1.2.11 wc 2.1
zlib 1.2.3

* gcc 4.4.1-nuwen uses DWARF-2 exception handling and TDM's 4.4.1-tdm-2 patches, without ehstatic.patch (which breaks the build) and libgcceh.patch (which breaks g++).

Recent History

Release Date GCC Version Changes
5.0 1/6/2010 4.4.1 Updated: gcc 4.4.1-nuwen, libpng 1.4.0. Rebuilt: Everything.
4.3 1/1/2010 4.3.3 Added: 7-Zip 4.65. Updated: binutils 2.20, Boost 1.41.0, freetype 2.3.11, gzip 1.3.13, jpegtran 7, libjpeg 7, libogg 1.1.4, libpng 1.2.41, libvorbis 1.2.3, make 3.81 20090914, mingw-runtime 3.17, patch 2.6.1, pngcrush 1.7.6, SDL 1.2.14, SDL_mixer 1.2.11, sed 4.2.1, upx 3.04, w32api 3.14, wget 1.12. Rebuilt: Everything.
4.2 5/18/2009 4.3.3 Updated: Boost 1.39.0, freetype 2.3.9, pngcrush 1.6.17, sed 4.2. Rebuilt: Everything.

Older releases are described in Ancient History below.

What MinGW Is

I recommend that anyone who is learning Standard C++ and who uses Windows for a primary development environment should use two compilers: the most modern version of Microsoft Visual Studio (currently 2008 SP1) and the most modern version of GCC, the GNU Compiler Collection. Using two compilers that conform closely to the Standard subjects your code to more strenuous trials than using a single compiler would.

There are many ports of GCC to Windows. You could always download Microsoft's own Subsystem For Unix-Based Applications (formerly Services For Unix). However, it contains a very old version of GCC.

MinGW is another port of GCC to Windows. It is free of charge and simple to use (well, as simple as toolchains ever get). It produces standalone Windows executables which may be distributed in any manner.

MinGW's official website, mingw.org, provides an installer, but it often includes an older version of GCC. It also contains stuff like support for Fortran and Objective C.

My distribution supports only C and C++. It uses the most modern versions of everything (when possible). It includes a large number of libraries and utility programs. Also, it is extremely easy to install and uninstall.

Please note that I did not write any of the components of my distribution. I simply compiled most of them from source and put them together. I provide instructions here for building your own distribution of MinGW, if you're interested in doing that.

Installation

Unzip the distribution using Windows Integrated ZIP. Put it into C:\MinGW .

A common mistake is to create C:\MinGW\MinGW . Don't do that. The bin directory and its friends should be directly under C:\MinGW .

You will also need to set one environment variable. This is easy in Windows XP. You need to add MinGW's executables to your Path so that you can invoke GCC from your Command Prompt. Right Click My Computer > Properties > Advanced > Environment Variables > System Variables > Path > Edit. Directories in the Path are separated by semicolons, so append ;C:\MinGW\bin to your Path. Do not erase any part of your Path under any circumstances. Then bonk OK.

Close all of your existing Command Prompts and open up a new one. Type gcc --version and hit Enter. You should see something like this:

C:\Temp>gcc --version
gcc (GCC) 4.4.1-nuwen
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


C:\Temp>

If you see something like that, then you have successfully installed MinGW.

Note that you can use a directory other than C:\MinGW , as my distribution is directory independent.

You should not modify anything in the MinGW directory unless you know what you're doing. In particular, do not compile your programs there!

C:\MinGW\README_STL.txt explains what my distribution includes.

Upgrading

To upgrade from one version of my distribution to another, simply replace C:\MinGW .

I shouldn't need to warn you about extracting a newer version of the distribution into a directory which already contains an older version. That would create a mess.

Nor should I need to warn you about deleting an older version before extracting a .tar.bz2 of a newer version. Remember, tar and bzip2 are part of the distribution.

Uninstallation

To uninstall my MinGW distribution, delete C:\MinGW (or whatever directory you installed it into). Leaving your Path unchanged won't hurt anything, but you can reset it to its original value if you like.

Components

This section is for people interested in building their own MinGW distributions.

Here are the binary components of my distribution. To build a distribution from them, put them all into the same directory and extract them.

components-5.0.tar.bz2 (25.0 MB)

I compiled all of these components myself, except for the ones marked NOTSTL, which I obtained from UnxUtils and the official 7-Zip and UPX websites.

Sources

This section is for people interested in building their own MinGW distributions.

Here are the build scripts, patches, and unmodified sources that I used to build my distribution.

sources-5.0.tar.bz2 (101.4 MB)

Most MinGW components must be compiled in MSYS. Here's what I used (see extract.txt ):

msys-4.3.tar.bz2 (3.3 MB)

I highly recommend that you execute each build script by hand before attempting to run it in one shot.

Important notes:

MSVC

This section is for people using libnuwen with MSVC 8.0 SP1.

Here are the build scripts that generate the headers and binary components required for libnuwen to be used with MSVC 8.0 SP1. For convenience, the generated headers and binary components are included.

msvc-3.3.tar.bz2 (26.2 MB)

The build scripts rely on the patches and unmodified sources that I used to build my distribution.

Ancient History

Release Date GCC Version Changes
4.1 2/22/2009 4.3.3 Removed: boost-jam. Updated: binutils 2.19.1, Boost 1.38.0, freetype 2.3.8, gcc 4.3.3-dw2-tdm-1, GLee 5.4, grep 2.5.4, libpng 1.2.35, mingw-runtime 3.15.2, pngcrush 1.6.14. Rebuilt: Everything.
4.0 12/31/2008 4.3.2 Removed: bison, flex. Updated: binutils 2.19, boost-jam 3.1.17, gcc 4.3.2-dw2, libpng 1.2.34, mingw-runtime 3.15.1, pngcrush 1.6.12, pngrewrite 1.3.0, w32api 3.13. Rebuilt: Everything.
3.14 11/9/2008 4.2.1 Updated: Boost 1.37.0, libpng 1.2.33, pngcrush 1.6.11. Rebuilt: pngcheck 2.3.0, pngrewrite 1.2.1.
3.13 10/12/2008 4.2.1 Updated: GLee 5.33, libpng 1.2.32, pngcrush 1.6.10. Rebuilt: pngcheck 2.3.0, pngrewrite 1.2.1.
3.12 9/21/2008 4.2.1 Patched: freetype 2.3.7, libjpeg 6b.
3.11 8/22/2008 4.2.1 Updated: libpng 1.2.31, pngcrush 1.6.9. Rebuilt: Boost 1.36.0, pngcheck 2.3.0, pngrewrite 1.2.1.
3.10 8/14/2008 4.2.1 Updated: Boost 1.36.0, freetype 2.3.7, pngcrush 1.6.7, wget 1.11.4.
3.9 5/19/2008 4.2.1 Removed: cat, cvs, expand, glpng, SDL_ttf. Updated: libpng 1.2.29, pngcrush 1.6.5. Rebuilt: pngcheck 2.3.0, pngrewrite 1.2.1.
3.8 5/5/2008 4.2.1 Updated: libpng 1.2.28, make 3.81 20080326-2, upx 3.03, wget 1.11.2. Rebuilt: pngcheck 2.3.0, pngcrush 1.6.4, pngrewrite 1.2.1.
3.7 3/31/2008 4.2.1 Updated: binutils 2.18.50 20080109-2, Boost 1.35.0, bzip2 1.0.5, make 3.81 20080326, vorbis-tools 1.2.0, wget 1.11.1.
3.6 2/28/2008 4.2.1 Updated: libpng 1.2.25, wget 1.11. Rebuilt: flex 2.5.4a, pngcheck 2.3.0, pngcrush 1.6.4, pngrewrite 1.2.1.
3.5 1/13/2008 4.2.1 Added: freetype 2.3.5, SDL_ttf 2.0.9. Updated: binutils 2.18.50 20080109.
3.4 12/31/2007 4.2.1 Updated: SDL 1.2.13.
3.3 12/29/2007 4.2.1 Patched: Boost 1.34.1. Updated: binutils 2.18.50 20071123, boost-jam 3.1.16, libpng 1.2.24, mingw-runtime 3.14, upx 3.02, w32api 3.11. Rebuilt: Everything.
3.2 10/21/2007 4.2.1 Updated: libpng 1.2.22. Rebuilt: pngcheck 2.3.0, pngcrush 1.6.4, pngrewrite 1.2.1.
3.1 9/10/2007 4.2.1 Added: GLee 5.21. Updated: libpng 1.2.20. Rebuilt: pngcheck 2.3.0, pngcrush 1.6.4, pngrewrite 1.2.1.
3.0 8/19/2007 4.2.1 Patched: boost-jam 3.1.14. Rebuilt: Boost 1.34.1. Updated: gcc 4.2.1-dw2-2, grep 2.5.3, libpng 1.2.19, libvorbis 1.2.0, mingw-runtime 3.13, upx 3.01, w32api 3.10.
2.8 8/2/2007 4.1.2 Rebuilt: SDL 1.2.12.
2.7 7/25/2007 4.1.2 Added: libogg 1.1.3, libvorbis 1.1.2, SDL_mixer 1.2.8, vorbis-tools 1.1.1. Updated: Boost 1.34.1.
2.6 7/20/2007 4.1.2 Updated: pngcheck 2.3.0, SDL 1.2.12.
2.5 5/18/2007 4.1.2 Updated: Boost 1.34.0, boost-jam 3.1.14, gzip 1.3.12, libpng 1.2.18, upx 3.00. Rebuilt: pngcheck 2.2.0, pngcrush 1.6.4, pngrewrite 1.2.1.
2.4 5/6/2007 4.1.2 Added: pngcheck 2.2.0.
2.3 4/5/2007 4.1.2 Patched: patch 2.5.9.
2.2 3/28/2007 4.1.2 Patched: GCC 4.1.2. Updated: mingw-runtime 3.12, w32api 3.9.
2.1 3/25/2007 4.1.2 Updated: gzip 1.3.9, wget 1.10.2. Rebuilt: make 3.81.
2.0 2/26/2007 4.1.2 Added: sed 4.1.5. Updated: binutils 2.17.50 20070129, GCC 4.1.2.
1.13 1/19/2007 3.4.2 Patched: Boost 1.34.0 20061231. Updated: bzip2 1.0.4, libpng 1.2.15. Rebuilt: pngcrush 1.6.4, pngrewrite 1.2.1.
1.12 1/1/2007 3.4.2 Updated: Boost 1.34.0 20061231.
1.11 12/13/2006 3.4.2 Updated: cvs 1.12.13a.
1.10 12/1/2006 3.4.2 Patched: libjpeg 6b. Updated: libpng 1.2.14. Rebuilt: pngcrush 1.6.4, pngrewrite 1.2.1.
1.9 11/20/2006 3.4.2 Added: jpegtran 6b. Updated: binutils 2.17.50 20060824, libpng 1.2.13, mingw-runtime 3.11, w32api 3.8. Rebuilt: pngcrush 1.6.4, pngrewrite 1.2.1.
1.8 8/8/2006 3.4.2 Added: libjpeg 6b.
1.7 6/28/2006 3.4.2 Updated: SDL 1.2.11.
1.6 6/22/2006 3.4.2 Patched: Boost 1.33.1. Removed: SDL_image. Updated: boost-jam 3.1.13, cvs 1.11.22, libpng 1.2.10, make 3.81, pngcrush 1.6.4, SDL 1.2.10, upx 2.01, w32api 3.7.
1.5 3/12/2006 3.4.2 Removed: gdb. Updated: binutils 2.16.91 20060119, Boost 1.33.1, boost-jam 3.1.12, cvs 1.11.21, mingw-runtime 3.9, pngcrush 1.6.2, SDL 1.2.9, w32api 3.6.
1.4 9/18/2005 3.4.2 Updated: Boost 1.33.0, boost-jam 3.1.11.
1.3 7/30/2005 3.4.2 Patched: Boost 1.32.0. Updated: zlib 1.2.3. Rebuilt: pngcrush 1.5.10, pngrewrite 1.2.1.
1.2 7/6/2005 3.4.2 Added: pngcrush 1.5.10, pngrewrite 1.2.1. Updated: bzip2 1.0.3.
1.1 5/29/2005 3.4.2 Patched: Boost 1.32.0. Updated: cvs 1.11.20.
1.0 4/25/2005 3.4.2 First release.

I am sometimes asked why I have occasionally removed components from the distribution. The answer is that the distribution contains exactly what I myself use. When I stop using something, I remove it. This reduces the size of the distro (and the components and sources archives), and also reduces the time that it takes to build the distro. In any event, keeping something that I don't use anymore is a bad idea; it's likely to get broken without me noticing it.

If you want a debugger, instead of building gdb, I suggest using MSVC's excellent debugger. Look at libnuwen for an example of how to build programs with GNU Make and debug them with MSVC (hint: after running $(BATCH_FILE) , type devenv program.exe program.cc to open it up in the debugger).


http://nuwen.net/mingw.html
Stephan T. Lavavej
stl@nuwen.net
Updated 1/6/2010.