We highly reccommend that you use the automated installers provided by MinGW
Should you choose to proceed with these instructions, you should read the following first:
- The MinGW GCC specific release notes for detailed notes, including known issues.
- The release notes for each individual package. Links to each of these can be found next to the name of each package file listed on the MinGW Download Page.
First, create a directory (e.g. C:\MinGW). You can download all of the packages to that directory and unzip them from there.
The resulting C:\MinGW subtree is fully relocatable which means that you can have multiple installations or versions MinGW suite. You can potentially have installations such as:
C:\MinGW-3.4.5 C:\MinGW-4.6.2 etc.
Switching between these is merely a matter of renaming any particular directory to C:\MinGW.
NOTE: We assume that C:\MinGW\bin; has been added to your user PATH environment variable. You can permanently add C:\MinGW\bin to your PATH by following the instructions in the "Environment Settings" section on the MinGW Getting Started page.
Next, you may need a program that can extract .tar.gz and .tar.lzma files, such as 7-Zip or one that provides command-line tar, gzip, and lzma tools. A basic standalone tar program that includes gz and lzma support is available from the MinGW project and is called bsdtar
Files To Get
The following is a list of the minimum requirements for a working C Language compiler using the MinGW GCC toolchain.
Download at least the following (or newer) packages from the MinGW Download Page. Where two or more component packages are indicated, you need both / all of them. (Note that the package links provided here refer to current releases at the time of writing; these links may not necessarily be updated immediately when new releases become available.):
- mingw-runtime (dev and dll)
- Required runtime libraries for GCC:
- gcc-core (bin and dll)
You will likely need the C++ compiler, as many source packages use a combination of C/C++
You can also add one or more of the following optional compilers or tools; (for each which you choose to install, you need will also need both the bin and the dll component packages):
- gcc-objc (bin and dll) for Objective C
- gcc-gfortran (bin and dll) for Fortran 90/95
- gcc-java (not yet available) for Java
- gcc-ada (bin and dll) for Ada
Note that the GCC versions of these files must match the GCC version of the gcc-core installed.
You can also add the following additional utilities:
- mingw-gdb and libexpat for debugger
- mingw32-make for make
- mingw-utils for MinGW Utilities
- msysDTK for Unix-style developer toolkit
- MSYS for Unix-style commands and shell.
NOTE: If you want to install the MSYS package, you should see the MinGW Getting Started page to install these compiler packages and MSYS automatically (as recommended above).
You may also want the following features:
After downloading you should install your extraction utility (if you grabbed one).
Next, open a Windows Explorer window and navigate to C:\MinGW. Double click on each of the downloaded "gz" or "lzma" files and extract them to C:\MinGW.
NOTE: Make sure you specify to extract using folder names
You can also use the windows command shell "cmd" to extract the files. Click on "Start \ Run" and type in "cmd" then press okay. Navigate to the C:\MinGW directory by using the following commands:
C: cd c:\MinGW
Now extract the files using one of the following commands (depending upon the extraction utility you have)
tar -x filename bsdtar -x filename bunzip filename
You may have some configuration to perform. To do this, read the section "After Installing You Should" found on the Getting Started page.
Getting Updates or Making Changes
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.
Information on other libraries commonly used by Open Source compilers using MinGW is available on the Libraries and Tools page.