|Original author(s)||Colin Peters|
|Initial release||1 July 1998|
|Stable release||0.6.0 - beta / September 5, 2013|
|Written in||C, C++|
|Operating system||Microsoft Windows|
|License||Public domain (headers), GNU General Public License (compiler and toolchain)|
It includes a port of the GNU Compiler Collection (GCC), GNU Binutils for Windows (assembler, linker, archive manager), a set of freely distributable Windows specific header files and static import libraries which enable the use of the Windows API, a Windows native build of the GNU debugger, and miscellaneous utilities.
MinGW does not rely on third-party C runtime DLL files, and because the runtime libraries are not distributed using GNU's General Public License (GPL), it is not necessary to distribute the source code with the programs produced, unless a GPL library is used elsewhere in the program.
MinGW can be run either on the native MS-Windows platform or cross-hosted on GNU/Linux.
MinGW was originally called mingw32 (Minimalist GNU for W32), following the GNU convention whereby Windows is shortened as "W32". The numbers were dropped in order to avoid the implication that it would be limited to producing 32-bit binaries. 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 Windows system 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.
Programming language support
Most languages supported by GCC are supported on the MinGW port as well. These include C, C++, Objective-C, Objective-C++, Fortran and Ada. The GCC runtime libraries are used (libstdc++ for C++, libgfortran for Fortran, etc.).
MinGW links by default to the Windows OS component library MSVCRT, which is the C library that Visual C version 7.1 linked to (the initial target was CRTDLL), which was released in 1998 and therefore does not include support for C99 features, or even all of C89; while targeting MSVCRT yields programs that require no additional runtime redistributables to be installed, the lack of support for C99 has caused porting problems, particularly where printf-style conversion specifiers are concerned. These issues have been partially mitigated by the implementation of a C99 compatibility library, libmingwex, but the extensive work required is far from complete and may never be fully realized. MinGW-w64 has resolved these issues, and provides fully POSIX compliant printf functionality.
The MinGW project maintains and distributes a number of different core components and supplementary packages, including various ports of the 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. Packages may be installed using the command line via mingw-get.
MinGW supports dynamic libraries named according to the
<name>.dll conventions, as well as static libraries following the
lib<name>.a naming convention common on Unix and Unix-like systems.
In addition, a component of MinGW known as MSYS (minimal system) provides Windows ports of a lightweight Unix-like shell environment including rxvt and a selection of POSIX tools sufficient to enable autoconf scripts to run, but it does not provide a C compiler or a case-sensitive file system.
mingwPORTs are user contributed additions to the MinGW software collection. Rather than providing these "add-ons" as precompiled binary packages, they are supplied in the form of interactive Bourne shell scripts, which guide the end user through the process of automatically downloading and patching original source code, then building and installing it. Users who wish to build any application from a mingwPORT must first install both MinGW and MSYS.
The implementation of Windows system headers and static import libraries 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.
Comparison with Cygwin
MinGW forked from version 1.3.3 of Cygwin. Although both Cygwin and MinGW can be used to port Unix software to Windows, they have different approaches: Cygwin aims to provide a complete POSIX layer that provides emulations of several system calls and libraries that exist on Linux, Unix, and the BSD variants. The POSIX layer runs on top of Windows, sacrificing performance where necessary for compatibility. Accordingly, this approach requires Windows 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 and performance via direct Windows API calls. MinGW does not require a compatibility layer DLL but remains closed-source.
Because MinGW is dependent upon Windows API calls, it cannot provide a full POSIX API; it is unable to compile some Unix applications that can be compiled with Cygwin. Specifically, this applies to applications that require POSIX functionality like
ioctl() and those that expect to be run in a POSIX environment. Applications written using a cross-platform library that has itself been ported to MinGW, 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. Cygwin Portable provides a similar feature that is by far, more robust.
It is also possible to cross-compile Windows applications with MinGW-GCC under POSIX systems. This means that developers do not need a Windows installation with MSYS to compile software that will run on Windows with or without Cygwin.
In 2005, MinGW-w64, was created by OneVision Software under clean room design principles, since the original MinGW project was not prompt on updating its code base, including the inclusion of several key new APIs and the much needed 64-bit support. In 2008, OneVision then donated the code to one of its lead developers, under the condition that it remain open source. It was first submitted to the original MinGW project, but refused under suspicion of using non-public or proprietary information. For many reasons, the lead developer and co-founder of the MinGW-w64 project, Kai Tietz, decided to not to attempt further cooperation with MinGW.
MinGW-w64 provides a more complete Win32 API implementation, including:
- better C99 support
- better POSIX Threads (pthreads) support (including the possibility to enable C++11 thread-related functionality in GCC's libstdc++)
- GCC multilib, which allows users to install 32-bit and 64-bit libraries in parallel
- Unicode entry point (wmain/wWinMain)
- DDK (from ReactOS)
- DirectX (from Wine)
- Large file support
- Win64 support
- Some useful tools such as
gendef(an improved version of MinGW's
widl(an IDL compiler, a free replacement for MIDL).
Additionally, the MinGW-w64 project maintains winpthreads, a wrapper library similar to pthreads-win32, with the main difference that it allows GCC to use it as a threads library resulting in functional C++11 thread libraries
- "Recent Project News". mingw.org.
- "MinGW". 2008-07-07. Retrieved 2013-10-16.
- "GNU Coding Standards". gnu.org. Free Software Foundation. April 27, 2013. 5.5 Portability between System Types. Retrieved July 1, 2013.
- Stallman, Richard (2000-09-18). "Libtool Re: Naming a project gnu-win32?". libtool mailing list. https://lists.gnu.org/archive/html/libtool/2000-09/msg00000.html. Retrieved 2013-05-21.
- "History". MinGW. Retrieved 2012-07-09.
- "Project of the Month". SourceForge.net. Retrieved 2012-07-09.
- gcc (2010-06-21). "C99". MinGW wiki.
- "FAQ". MinGW. Retrieved 2012-07-09.
- "MinGW - Minimalist GNU for Windows - Browse Files at". Sourceforge.net. Retrieved 2012-07-09.
- "MinGW Command Line Interface Installer". Retrieved 14 June 2012.
- "MSYS". MinGW. Retrieved 2012-07-09.
- "MSYS". MinGW. Retrieved 2012-07-09.
- "MSYS". MinGW.org. Retrieved 2011-05-20. "A common misunderstanding is MSYS is "UNIX on Windows", MSYS by itself does not contain a compiler or a C library, [...] nor does it provide any UNIX specific functionality like case-sensitive filenames."
- "mingwPORT". MinGW. Retrieved 2012-07-09.
- "Licensing Terms". MinGW. Retrieved 2012-07-09.
- "Cygwin". MinGW. Retrieved 2012-07-09.
- "History". MinGW-w64 Wiki. Retrieved 30 May 2013.
- Marshall, Keith (19 July 2009). "Re: Harmonizing mingwrt / w32api with mingw-w64". MinGW-dvlpr mailing list. http://sourceforge.net/p/mingw/mailman/message/23100595/. Retrieved 12 June 2014. "However, we would require a formal audit of mingw-64 code, to ensure conformance with our requirements for truly open documentation of sources, before [merge of mingw-w64] could be completed."
- Tietz, Kai (20 July 2014). "Re: Harmonizing mingwrt / w32api with mingw-w64". MinGW-dvlpr mailing list. http://sourceforge.net/p/mingw/mailman/message/23108552/. Retrieved 12 June 2014.
- "Downloads - MinGW-w64". Retrieved 30 May 2013.