This page explains how to download and install MinGW.

The first 3 things you need to know

1. To use MinGW, start with downloading binutils, gcc-core, w32api and runtime. Whatever you'll do you'll always need these. Adding additional languages (g++, g77, ada etc.) may be done now or at any later stage. You may wish to download (the very useful but purely optional) MSYS binaries installation file from MinGW downloads page as well. You may need to download additional installation files later (for other languages).

2. Current MinGW users have significantly different expectations from MinGW. The following description may help you to start, while a more detailed explanation is provided later in this text.

3. Version numbering for Mingw as a whole does not exist; in particular, the version number of the MinGW installer is in no way related to the version of GCC which it installs. Dates of last changes are available from MinGW downloads page. The version of GCC installed may be determined by executing the command `gcc --version'; please report this, if asking for help.


(For those impatient to get up and running real fast, you might like to try the page RealDumbQuickstart.)

(For those frustrated with the following, you might want to try the page SmartQuickStart.) Recommended!?

(If you want to create native Windows applications using GTK+ and Glade, take a look at GladeGuide.)

What to get

The first decision is whether you wish to use the automated installer or resort to manual installation. The automated installer is recommended if you don't care about all the details of the installation. The manual installer gives you full control about everything that happens (and is described later). While the author of these particular lines always does a manual install, be warned this also is the option that lets you break things if you do it wrongly ;-)

Automated Installer

If you're undecided upon what you need or want, we would recommend installing all three packages in the Quick Intro section of this page. If you follow this recommendation, you'll have everything you basically need, and no troubles at all.

Otherwise, you'll probably want to do a custom installation to perfectly suit your needs. Common configurations would be:

Download

All packages mentioned hereafter can be downloaded from Sourceforge's MinGW project page. Your best bet is to download files from the Current section.

Quick Intro

This section gives a very brief overview of the installation procedure for MinGW, and related packages; more detailed, package specific instructions will be found below. Note that, unless you are installing for shared use by multiple users, you should not need administrative privileges to install any MinGW package.

NOTE: As of October 16, 2005, the MinGW-4.NN.exe installer is broken, and has been withdrawn from the "current" download offering. It's probably best for noobs to just wait until it's working again. There have been a few threads about this on the mailing list and it looks just too darn hard for newbies to try to install MinGW from the raw packages. If you are desperate to get started, you might like to try the MinGW-3.1.0.exe version, from the "previous" section, or, for the brave, the latest MinGW-5.NN.exe version from "proposed".

Download MinGW-NNN.exe, MSYS-NNN.exe, msysDTK-NNN.exe and install them in this order.

Example:
- Install MinGW to C:\Devel\MinGW
don't install to a directory with spaces!? - Install MSYS to C:\Devel\MSYS\1.0, answer the post-install questions with y; when asked give the path as C:/Devel/MinGW
- Install msysDTK to C:\Devel\MSYS\1.0
- Start C:\Devel\MSYS\1.0\msys.bat.

Be happy. You have a decent shell with tab completion, you have vim, you have perl. And of course most other stuff you need to build applications.


Full Description of how to get started

You should almost certainly download the MINGW-NNN.EXE package. It is simpler to install it before you install MSYS, if you plan to use both.

MINGW-NNN.EXE (MinGW)

How to install MinGW

This package is the compiler toolset. According to page MinGW: A collection of freely available and freely distributable Windows(TM) specific header files and import libraries combined with GNU toolsets that allow one to produce native Windows(TM) programs that do not rely on any 3rd-party C runtime DLLs.

This package is self-sufficient: that means that by just installing this package, you can compile native Windows(TM) applications without any additional packages. Along with an optional IDE, this is all you need, if you don't require a Unix-like shell, or autoconf tools.

This package contains the following components:

MSYS-NNN.EXE (MSYS)

The installation of this package is preferably done after installing the MinGW-NNN.exe package as this package will try to automatically configure itself to use the pre-installed MinGW package.

How to install MSYS
How to build MSYS from scratch

This is the main package that contains the shell. If you plan to compile non-native Windows(TM) source code (such as any MSYS source-code) then this package is a must. According to the page MSYS: A Minimal SYStem to provide POSIX/Bourne configure scripts the ability to execute and create a Makefile used by make.

This package contains the following components:

msysDTK-NNN.exe (MSYS Developer Tool Kit)

How to install msysDTK?

This package provides common packages that are needed by developers but are currently just easier to provide dependent on the msys runtime dll. These were chosen because they are the ones that most developers frequently use and need.

This package contains the following components:

msysDVLPR.tar.gz (MSYS Developer)

How to install msysDVLPR?

This package is the compiler toolset for MSYS and MSYS only. It will compile applications that will require the MSYS DLL; it does not compile native Windows(TM) applications! For the latter, you should install MinGW-NNN.exe

Unlike other packages, this one is an archive file (notice the "tar.gz" instead of "exe" extension). Unzip all the files at the root of your MSYS installation. Just like msysDTK-NNN.exe, this package is dependent on MSYS-NNN.exe

Manual Install

  1. Download at least the following (or newer) packages from the MinGW download page

    These are the minimum requirement for a working mingw-gcc-toolchain for C.

    Optionally you may want to add any of the following additional languages:

    Note that the GCC versions of these files should match the GCC version of the gcc-core installed.

    Optionally you may want to add any of the following additional utilities:

    You will also need a program that can extract tar.gz files, such as the GUI-based WinZip or 7-Zip, or the command-line tar and gzip tools. Command line tools are provided by MSYS, or Google for 'gnu+tools+win32' to find alternatives. The GnuWin32 project provides Windows-native builds of tar and gzip CLI tools.

    Create a directory (e.g. C:\MinGW), download all packages to C:\MinGW, for each package execute gunzip/untar package, and add C:\MinGW\bin to your PATH environment variable:

    Example:

    C:\Documents and Settings\Owner> cd /d c:\
    C:\> md MinGW
    C:\> cd MinGW

    Download all packages to C:\MinGW

    C:\MinGW> gzip -d -c binutils-2.17.50-20060824-1.tar.gz | tar x
    C:\MinGW> gzip -d -c gcc-core-3.4.5-20060117-3.tar.gz | tar x
    C:\MinGW> gzip -d -c mingw-runtime-3.14.tar.gz | tar x
    C:\MinGW> gzip -d -c w32api-3.11.tar.gz | tar x
    C:\MinGW> set path=C:\MinGW\bin;%path%

    The whole C:\MinGW subtree is fully relocatable which means there can be several different versions of the MinGW toolchain installed in parallel, e.g. in directories C:\MinGW-3.3.3, C:\MinGW-3.4.2 and C:\MinGW-3.4.5. Switching between these is merely a matter of renaming directories, assuming C:\MinGW\bin has been added to the path. You can permanently add C:\MinGW\bin to the path by opening the System control panel, going to the Advanced tab, and clicking the Environmental Variables button.

    Updating single packages (e.g. when there is a new version of the w32api) can be done by copying the new package to C:\MinGW and unpacking as above to overwrite the older version. This manual update also works with an initial automated install.

Expanding functionality

mingwPORT packages may be used to add functionality to your MSYS/MinGW installation.

HomePage

PHP Warning

lib/XmlElement.php:43 Warning[2]: get_class() expects parameter 1 to be object, string given (...repeated 9 times)

lib/XmlElement.php (In template 'navbar' < 'top' < 'body' < 'html'):43 Warning[2]: get_class() expects parameter 1 to be object, string given:

lib/XmlElement.php (In template 'navbar' < 'top' < 'body' < 'html'):43 Warning[2]: get_class() expects parameter 1 to be object, string given:

lib/XmlElement.php (In template 'browse' < 'body' < 'html'):43 Warning[2]: get_class() expects parameter 1 to be object, string given

lib/XmlElement.php (In template 'browse' < 'body' < 'html'):43 Warning[2]: get_class() expects parameter 1 to be object, string given

lib/XmlElement.php (In template 'browse' < 'body' < 'html'):43 Warning[2]: get_class() expects parameter 1 to be object, string given

lib/XmlElement.php (In template 'browse' < 'body' < 'html'):43 Warning[2]: get_class() expects parameter 1 to be object, string given

lib/XmlElement.php (In template 'browse' < 'body' < 'html'):43 Warning[2]: get_class() expects parameter 1 to be object, string given

lib/XmlElement.php (In template 'browse' < 'body' < 'html'):43 Warning[2]: get_class() expects parameter 1 to be object, string given

lib/XmlElement.php (In template 'browse' < 'body' < 'html'):43 Warning[2]: get_class() expects parameter 1 to be object, string given

lib/XmlElement.php (In template 'browse' < 'body' < 'html'):43 Warning[2]: get_class() expects parameter 1 to be object, string given

lib/XmlElement.php (In template 'browse' < 'body' < 'html'):43 Warning[2]: get_class() expects parameter 1 to be object, string given

lib/XmlElement.php (In template 'browse' < 'body' < 'html'):43 Warning[2]: get_class() expects parameter 1 to be object, string given

Valid XHTML 1.0! Valid CSS!
Page Execution took real: 0.220, user: 0.180, sys: 0.010 seconds , Memory: 2657360

lib/XmlElement.php (In template 'browse' < 'body' < 'html'):43 Warning[2]: get_class() expects parameter 1 to be object, string given

lib/XmlElement.php (In template 'browse' < 'body' < 'html'):43 Warning[2]: get_class() expects parameter 1 to be object, string given

lib/XmlElement.php (In template 'browse' < 'body' < 'html'):43 Warning[2]: get_class() expects parameter 1 to be object, string given

lib/XmlElement.php (In template 'browse' < 'body' < 'html'):43 Warning[2]: get_class() expects parameter 1 to be object, string given

lib/XmlElement.php (In template 'browse' < 'body' < 'html'):43 Warning[2]: get_class() expects parameter 1 to be object, string given

lib/XmlElement.php (In template 'browse-footer'):43 Warning[2]: get_class() expects parameter 1 to be object, string given

lib/XmlElement.php (In template 'actionbar' < 'browse-footer'):43 Warning[2]: get_class() expects parameter 1 to be object, string given: