Automated Installer
If you are new to MinGW [4], see the MinGW Getting Started [5] instructions to use the automated GUI or manual CLI (Command Line Interface) installers.
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 [6] 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 [7].
Manual Installation
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 [5] page.
Next, you may need a program that can extract .tar.gz and .tar.lzma files, such as 7-Zip [8] 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 [9]
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.):
- binutils [10]
- mingw-runtime (dev [11] and dll [12])
- w32api [13]
- Required runtime libraries for GCC:
- gcc-core (bin [28] and dll [29])
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 [32] and dll [33]) for Objective C
- gcc-gfortran (bin [34] and dll [35]) for Fortran 90/95
- gcc-java (not yet available) for Java
- gcc-ada (bin [36] and dll [37]) 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 [38] and libexpat [39] for debugger
- mingw32-make [40] for make
- mingw-utils [41] for MinGW Utilities
- msysDTK [42] for Unix-style developer toolkit
- MSYS [43] for Unix-style commands and shell.
NOTE: If you want to install the MSYS package, you should see the MinGW Getting Started [5] page to install these compiler packages and MSYS automatically (as recommended above).
You may also want the following features:
- translations of gcc [44], binutils [45], and make [46] messages into languages other than English
- documentation [47]
After Downloading
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 filenameAfter Extracting
You may have some configuration to perform. To do this, read the section "After Installing You Should" found on the Getting Started [5] 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 [48] page.