Jump to content

MinGW

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by TXiKiBoT (talk | contribs) at 21:09, 22 April 2010 (robot Adding: cs:MinGW). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

MinGW
Original author(s)Colin Peters
Developer(s)MinGW Project
Initial release1 July 1998
Stable release
4.5.0 / April 19, 2010; 14 years ago (2010-04-19)[1]
Preview release
none / n/a
Written inAda, C, C++, Fortran, Java, Pascal
Operating systemMicrosoft Windows
TypeCompiler
LicensePublic domain (headers)
GNU General Public License (compiler and toolchain)
Websitewww.MinGW.org

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.[2] Included in MinGW are extensions to the Microsoft Visual C++ runtime library to support C99 functionality.[2]

As a consequence, a predominant feature of MinGW that may not be apparent to Open Source users at first, is that it does not use the GNU libc (C Library), but attempts to directly utilize the MS C Runtime Library (MSVCRT). Hence it aims to be as native as possible, in contrast to Cygwin. For languages other than C, MinGW uses the GNU libraries (for example, GNU libstdc++ for C++).

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.[3] Colin Peters authored the initial release in 1998, consisting only of a Cygwin port of GCC.[4][5] Jan-Jaap van der Heijden created a Windows-native port of GCC and added binutils and make.[4][5] Mumit Khan later took over development, adding more Windows-specific features to the package, including the Win32 headers by Anders Norlander.[4][5] In 2000, the project was moved to SourceForge.net in order to solicit more assistance from the community and centralize its development.[4][5]

MinGW was selected as Project of the Month at SourceForge.net for September 2005.[5]

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.[6][3] These utilities can be used from the Windows command line or integrated into an IDE. MinGW supports libraries named according to the "<name>.lib" and"<name>.dll" conventions, in addition to the normal "lib<name>.a"convention common on *nix systems.

In addition, a component of MinGW known as MSYS (Minimal SYStem) provides win32 ports of a lightweight Unix-like shell environment including rxvt and a selection of POSIX tools sufficient to enable autoconf scripts to run.[7][8]

The implementation of Win32 header files and Win32 import libraries for run-time linking are released under a permissive license[9], 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.[4] Although both Cygwin and MinGW can be used to port Unix software to Windows, they have different approaches[10]: 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 and performance via direct Windows API calls. Unlike Cygwin, MinGW does not require a compatibility layer DLL and thus programs do not need to be distributed with source code.

Since MinGW uses Win32-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 fork(), mmap() or ioctl()[10] 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. By providing more functionality, Cygwin becomes more complicated to install and maintain.

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 without Cygwin.

See also

References

  1. ^ Release information corresponds to the GCC package only.
  2. ^ a b SourceForge.net: MinGW - Minimalist GNU for Windows
  3. ^ a b What is MinGW? Cite error: The named reference "FAQ-What" was defined multiple times with different content (see the help page).
  4. ^ a b c d e MinGW - History
  5. ^ a b c d e SourceForge Project of the Month
  6. ^ MinGW Components
  7. ^ What is MSYS?
  8. ^ MinGW - Minimal SYStem
  9. ^ http://www.mingw.org/license
  10. ^ a b http://www.mingw.org/node/21