HOME

TheInfoList



OR:

MinGW ("Minimalist GNU for Windows"), formerly mingw32, is a
free and open source Free and open-source software (FOSS) is software available under a license that grants users the right to use, modify, and distribute the software modified or not to everyone free of charge. FOSS is an inclusive umbrella term encompassing free ...
software development Software development is the process of designing and Implementation, implementing a software solution to Computer user satisfaction, satisfy a User (computing), user. The process is more encompassing than Computer programming, programming, wri ...
environment to create
Microsoft Windows Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
applications. MinGW includes a
port A port is a maritime facility comprising one or more wharves or loading areas, where ships load and discharge cargo and passengers. Although usually situated on a sea coast or estuary, ports can also be found far inland, such as Hamburg, Manch ...
of the
GNU Compiler Collection The GNU Compiler Collection (GCC) is a collection of compilers from the GNU Project that support various programming languages, Computer architecture, hardware architectures, and operating systems. The Free Software Foundation (FSF) distributes ...
(GCC), GNU Binutils for Windows ( assembler,
linker Linker or linkers may refer to: Computing * Linker (computing), a computer program that takes one or more object files generated by a compiler or generated by an assembler and links them with libraries, generating an executable program or shar ...
, archive manager), a set of freely distributable Windows specific
header file An include directive instructs a text file processor to replace the directive text with the content of a specified file. The act of including may be logical in nature. The processor may simply process the include file content at the location of ...
s and static import libraries which enable the use of the
Windows API The Windows API, informally WinAPI, is the foundational application programming interface (API) that allows a computer program to access the features of the Microsoft Windows operating system in which the program is running. Programs can acces ...
, a Windows native build of the
GNU Project The GNU Project ( ) is a free software, mass collaboration project announced by Richard Stallman on September 27, 1983. Its goal is to give computer users freedom and control in their use of their computers and Computer hardware, computing dev ...
's
GNU Debugger The GNU Debugger (GDB) is a portable debugger that runs on many Unix-like systems and works for many programming languages, including Ada, Assembly, C, C++, D, Fortran, Haskell, Go, Objective-C, OpenCL C, Modula-2, Pascal, Rust, and par ...
, and miscellaneous utilities. MinGW does not rely on
third-party Third party may refer to: Business * Third-party source, a supplier company not owned by the buyer or seller * Third-party beneficiary, a person who could sue on a contract, despite not being an active party * Third-party insurance, such as a veh ...
C runtime
dynamic-link library A dynamic-link library (DLL) is a shared library in the Microsoft Windows or OS/2 operating system. A DLL can contain executable code (functions), data, and resources. A DLL file often has file extension .dll even though this is not required ...
(DLL) files, and because the runtime libraries are not distributed using the
GNU General Public License The GNU General Public Licenses (GNU GPL or simply GPL) are a series of widely used free software licenses, or ''copyleft'' licenses, that guarantee end users the freedom to run, study, share, or modify the software. The GPL was the first ...
(GPL), it is not necessary to distribute the
source code In computing, source code, or simply code or source, is a plain text computer program written in a programming language. A programmer writes the human readable source code to control the behavior of a computer. Since a computer, at base, only ...
with the programs produced, unless a GPL library is used elsewhere in the program. MinGW can be run either on the native Microsoft Windows platform, cross-hosted on
Linux Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
(or other Unix), or "cross-native" on
Cygwin Cygwin ( ) is a free and open-source Unix-like environment and command-line interface (CLI) for Microsoft Windows. The project also provides a software repository containing open-source packages. Cygwin allows source code for Unix-like operati ...
. Although programs produced under MinGW are 32-bit executables, they can be used both in 32 and 64-bit versions of Windows. The development of the MinGW project has been forked with the creation in 2005–2008 of an alternative project called Mingw-w64.


History

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 SourceForge is a web service founded by Geoffrey B. Jeffery, Tim Perdue, and Drew Streib in November 1999. SourceForge provides a centralized software discovery platform, including an online platform for managing and hosting open-source soft ...
in order to solicit more assistance from the community and centralize its development. MinGW was selected as Project of the Month at SourceForge for September 2005. MSYS (a contraction of "Minimal System") was introduced as a
Bourne shell The Bourne shell (sh) is a shell command-line interpreter for computer operating systems. It first appeared on Version 7 Unix, as its default shell. Unix-like systems continue to have /bin/sh—which will be the Bourne shell, or a symbolic lin ...
command line interpreter system with the aim of better interoperability with native Windows software. In 2018, following a disagreement with SourceForge about the administration of its mailing lists, MinGW migrated to OSDN.


Fork

In 2007, a fork of the original MinGW called Mingw-w64 appeared in order to provide support for 64 bits and new APIs. It has since then gained widespread use and distribution. MSYS2 ("minimal system 2") is a software distribution and a development platform for
Microsoft Windows Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
, based on Mingw-w64 and
Cygwin Cygwin ( ) is a free and open-source Unix-like environment and command-line interface (CLI) for Microsoft Windows. The project also provides a software repository containing open-source packages. Cygwin allows source code for Unix-like operati ...
, that helps to deploy code from the
Unix Unix (, ; trademarked as UNIX) is a family of multitasking, multi-user computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, a ...
world on Windows.


Programming language support

Most languages supported by GCC are supported on the MinGW port as well. These include C, C++,
Objective-C Objective-C is a high-level general-purpose, object-oriented programming language that adds Smalltalk-style message passing (messaging) to the C programming language. Originally developed by Brad Cox and Tom Love in the early 1980s, it was ...
,
Objective-C++ Objective-C is a high-level general-purpose, object-oriented programming language that adds Smalltalk-style message passing (messaging) to the C (programming language), C programming language. Originally developed by Brad Cox and Tom Love in ...
, 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++ Microsoft Visual C++ (MSVC) is a compiler for the C, C++, C++/CLI and C++/CX programming languages by Microsoft. MSVC is proprietary software; it was originally a standalone product but later became a part of Visual Studio and made available ...
version 6.0 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 printf is a C standard library function that formats text and writes it to standard output. The function accepts a format c-string argument and a variable number of value arguments that the function serializes per the format string. Mism ...
-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.


Link compatibility

Binaries (executables or DLLs) generated with different C++ compilers (like MinGW and Visual Studio) are in general not link compatible. However, compiled C code is link compatible.


Components

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 .lib and .dll conventions, as well as static libraries following the lib.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 Shell may refer to: Architecture and design * Shell (structure), a thin structure ** Concrete shell, a thin shell of concrete, usually with no interior columns or exterior buttresses Science Biology * Seashell, a hard outer layer of a marine ani ...
environment including rxvt and a selection of
POSIX The Portable Operating System Interface (POSIX; ) is a family of standards specified by the IEEE Computer Society for maintaining compatibility between operating systems. POSIX defines application programming interfaces (APIs), along with comm ...
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 The Bourne shell (sh) is a shell command-line interpreter for computer operating systems. It first appeared on Version 7 Unix, as its default shell. Unix-like systems continue to have /bin/sh—which will be the Bourne shell, or a symbolic lin ...
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 A permissive software license, sometimes also called BSD-like or BSD-style license, is a free-software license which instead of copyleft protections, carries only minimal restrictions on how the software can be used, modified, and redistributed, ...
, while the GNU ports are provided under the
GNU General Public License The GNU General Public Licenses (GNU GPL or simply GPL) are a series of widely used free software licenses, or ''copyleft'' licenses, that guarantee end users the freedom to run, study, share, or modify the software. The GPL was the first ...
. Binary downloads of both the complete MSYS package and individual MinGW GNU utilities are available from the MinGW site.


Comparison with 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 The Portable Operating System Interface (POSIX; ) is a family of standards specified by the IEEE Computer Society for maintaining compatibility between operating systems. POSIX defines application programming interfaces (APIs), along with comm ...
layer comprising a full implementation of all major Unix system calls and libraries. Compatibility is considered a higher priority than performance. On the other hand, MinGW's priorities are simplicity and performance. As such, it does not provide certain
POSIX The Portable Operating System Interface (POSIX; ) is a family of standards specified by the IEEE Computer Society for maintaining compatibility between operating systems. POSIX defines application programming interfaces (APIs), along with comm ...
APIs which cannot easily be implemented using the Windows API, such as fork(), mmap() and ioctl(). Applications written using a
cross-platform Within computing, cross-platform software (also called multi-platform software, platform-agnostic software, or platform-independent software) is computer software that is designed to work in several Computing platform, computing platforms. Some ...
library that has itself been ported to MinGW, such as SDL,
wxWidgets wxWidgets (formerly wxWindows) is a widget toolkit and tools library for creating graphical user interfaces (GUIs) for cross-platform applications. wxWidgets enables a program's GUI code to compile and run on several computer platforms with no s ...
, Qt, or
GTK GTK (formerly GIMP ToolKit and GTK+) is a free software cross-platform widget toolkit for creating graphical user interfaces (GUIs). It is licensed under the terms of the GNU Lesser General Public License, allowing both Free software, free and ...
, will usually compile as easily in MinGW as they would in Cygwin. Windows programs written with Cygwin run on top of a
copyleft Copyleft is the legal technique of granting certain freedoms over copies of copyrighted works with the requirement that the same rights be preserved in derivative works. In this sense, ''freedoms'' refers to the use of the work for any purpose, ...
ed compatibility DLL that must be distributed with the program, unless statically linked. If dynamically linked, the program must also provide information on where to obtain Cygwin source. MinGW does not require a
compatibility layer In software engineering, a compatibility layer is an interface that allows binaries for a legacy or foreign system to run on a host system. This translates system calls for the foreign system into native system calls for the host system. With s ...
, since MinGW-based programs are compiled with direct calls to Windows APIs. 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. It is also possible to
cross-compile A cross compiler is a compiler capable of creating executable code for a platform other than the one on which the compiler is running. For example, a compiler that runs on a PC but generates code that runs on Android devices is a cross compil ...
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.


See also

*
Cygwin Cygwin ( ) is a free and open-source Unix-like environment and command-line interface (CLI) for Microsoft Windows. The project also provides a software repository containing open-source packages. Cygwin allows source code for Unix-like operati ...
* Windows Subsystem for Linux * Mingw-w64


References


External links


Official MinGW website


- maintained by


MXE
- Makefiles to build MinGW on Unix and many common dependencies libraries, pre-built packages available {{Unix-Windows interoperability 1998 software C (programming language) compilers C++ compilers Cross-compilers Fortran compilers Free and open source compilers Public-domain software