MinGW ("Minimalistic GNU for Windows") is a Windows port of GCC and other GNU utilities.
MinGW is a collection of freely available and freely distributable Windows specific header files and import libraries combined with GNU toolsets that allow one to produce native Windows programs that do not rely on any 3rd-party C runtime DLLs.
MinGW refers to a set of runtime headers, used in building a compiler system based on the GNU GCC and binutils projects. It compiles and links code to be run on Win32 platforms... providing C, C++ and Fortran compilers plus other related tools.
If you see references to "mingw32" instead of "MinGW", they are referring to the same compiler system. The project's name changed from mingw32 to MinGW is to prevent the implication that MinGW will only works on 32 bit systems (as 64 and higher bit machines become more common, MinGW will evolve to work with them).
MinGW uses the Microsoft runtime libraries, distributed with the Windows operating system. Unlike other ports of GCC to Windows, the runtime libraries are not distributed using GNU's General Public License (GPL). You, therefore, do not have to distribute your source code with your programs unless, of course, you use a GPL library in your programs.
Packages included in MinGW
- binutils: Assembler, linker, archive manager
- gcc: A port of the GNU Compiler Collection
- gcc-core - C compiler
- gcc-g++ - C++ compiler
- gcc-objc - Objective C compiler
- gcc-fortran - Fortran compiler
- gcc-java - Java compiler
- gcc-ada - Ada compiler
- mingw-runtime: Headers and libraries for the C library
- w32api: Windows API header files and libraries
- mingw32-make: Windows native build of GNU make
- mingw-gdb: Windows native build of GNU debugger
- mingw-utils: MinGW utilities
- MSYS: Unix-like command-line utilities for deployment on MS-Windows
- msysDTK: MSYS developer tool kit
- mingwPORT: Utilities for porting GNU software to MinGW
Once you have all these packages (although mingw32-make is not necessary if you have MSYS or Cygwin), you may download updated individual packages, like GCC, and extract them into the MinGW directory.
How to install MinGW
If you are new to MinGW, use the MinGW automated installer to get everything set up in the proper directories.
- Run the MinGW automated installer (mingw-get-setup.exe).
- Choose to install into a folder with no white spaces in its absolute path name. For example the default directory: C:\MinGW.
- You will be offered the option to continue with installation of a basic selection of MinGW packages.
- Select all components. At minimum, select C++ Compiler and MSYS Basic System in addition to the default C Compiler.
- The latest repository catalogs will be downloaded and read. Then, the latest components will be downloaded and installed.