MinGW (
Minimalist GNU for Windows), formerly
mingw32, is a native
software port of the
GNU Compiler Collection (GCC) to
Microsoft Windows, along with a set of freely distributable import libraries and
header files for the
Windows API. MinGW allows developers to create native Microsoft Windows applications. Included in MinGW are extensions to the
Microsoft Visual C++ runtime library to support
C99 functionality.
MinGW was selected as Project of the Month at SourceForge.net for September 2005.
Components of MinGW
The MinGW project maintains and distributes a number of different core components and supplementary packages, including various ports of
GNU toolchain, such as
GCC and
binutils, translated into equivalent packages. These utilities can be used from the
Windows command line or integrated into an
IDE.
In addition, a component of MinGW known as MSYS (Minimal SYStem) provides a lightweight Unix-like shell environment including rxvt and a selection of POSIX tools sufficient to enable autoconf scripts to run.
MSYS and the Win32 header files are released under a permissive license, while the GNU ports are provided under the GNU General Public License. Binary downloads of both the complete MSYS package and individual MinGW GNU utilities are available from the MinGW site.
History
MinGW was originally called mingw32; the numbers were dropped in order to avoid the implication that it would be limited to 32-bit systems. Colin Peters authored the initial release in 1998, consisting only of a
Cygwin port of
GCC. Jan-Jaap van der Heijden created a Windows-native port of GCC and added
binutils and
make. Mumit Khan later took over development, adding more Windows-specific features to the package, including the
Win32 headers by Anders Norlander. In 2000, the project was moved to
SourceForge.net in order to solicit more assistance from the community and centralize its development.
Comparison with Cygwin
MinGW was a fork of version 1.3.3 of Cygwin. Although both Cygwin and MinGW are used to port Unix software to Windows, they have different approaches: Cygwin aims to provide a complete
POSIX layer (similar to that found in a Linux or other Unix systems) on top of Windows, sacrificing performance where necessary for compatibility. Accordingly, this approach requires Win32 programs written with Cygwin to run on top of a
copylefted compatibility library that must be distributed with the program, along with the program's source code. MinGW aims to provide native functionality via direct Windows API calls, prioritizing performance. Unlike Cygwin, MinGW does not require a
compatibility layer
DLL, and its runtime shell MSYS is licensed under a
permissive license.
Since MinGW does not provide a POSIX API, it is unable to compile some Unix applications that can be compiled with Cygwin. Specifically, this applies to applications that require specific POSIX functionality and those that expect to be run in a POSIX environment. Applications written using cross-platform libraries, such as SDL, wxWidgets, Qt, or GTK+ will usually compile as easily in MinGW as they would in Cygwin.
The combination of MinGW and MSYS provides a small, self-contained environment that can be loaded onto removable media without leaving entries in the registry or files on the computer. By providing more functionality, Cygwin becomes more complicated to install and maintain.
It is also possible to cross-compile applications with MinGW. This means that developers do not need a Windows installation with MSYS to compile software that will run on Windows without Cygwin.
See also
References
External links