Jump to content

MinGW: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
m →‎External links: case is inconsistent on their website -- go with common usage
No edit summary
 
(42 intermediate revisions by 30 users not shown)
Line 1: Line 1:
{{Short description|Free and open-source software for developing applications in Microsoft Windows}}
{{Distinguish|Mingw-w64}}
{{primary sources|date=May 2012}}
{{primary sources|date=May 2012}}
{{Infobox software
{{Infobox software
| author = Colin Peters
| author = Colin Peters
| developer = MinGW Project
| developer = MinGW Project
| screenshot = MinGW installation manager.webp
| caption = MinGW installation manager
| released = {{Start date and age|1998|07|01}}
| released = {{Start date and age|1998|07|01}}
| latest release version = GNU BinUtils—2.32-1, Installation Manager—0.6.3, WSL—5.2.1<ref name="paklist">{{cite web | url=https://osdn.net/projects/mingw/releases/ | title=Download Package list | website=osdn.net}}</ref>
| latest release version = GNU BinUtils—2.32-1, Installation Manager—0.6.3, WSL—5.4.2<ref name="paklist">{{cite web | url=https://osdn.net/projects/mingw/releases/ | title=Download Package list | website=osdn.net |access-date=2023-02-04}}</ref>
| latest release date = {{Start date and age|2019|02|11}}
| latest release date = {{Start date and age|2021|04|12}}
| latest preview version =
| latest preview version =
| latest preview date =
| latest preview date =
Line 12: Line 16:
| genre = [[Compiler]]
| genre = [[Compiler]]
| license = [[Public domain]] (headers), [[GNU General Public License]] (compiler and toolchain)
| license = [[Public domain]] (headers), [[GNU General Public License]] (compiler and toolchain)
| website = {{URL|mingw.org}}
| website = {{URL|osdn.net/projects/mingw}}
| repo = {{URL|osdn.net/projects/mingw/scm/}}
}}
}}


'''MinGW''' ("Minimalist GNU for Windows"), formerly '''mingw32''', is a [[Free and open-source software|free and open source]] [[software development]] environment to create [[Microsoft Windows]] applications. The development of the MinGW project has been [[software forking|forked]] with the creation in 2005–2008 of an alternative project called [[Mingw-w64]].
'''MinGW''' ("Minimalist GNU for Windows"), formerly '''mingw32''', is a [[Free and open-source software|free and open source]] [[software development]] environment to create [[Microsoft Windows]] applications.


MinGW includes a [[porting|port]] of the [[GNU Compiler Collection]] (GCC), [[GNU Binutils]] for Windows ([[assembler (computing)|assembler]], [[linker (computing)|linker]], [[Archive file|archive manager]]), a set of freely distributable Windows specific [[header file]]s and [[Static library|static import libraries]] which enable the use of the [[Windows API]], a Windows native build of the [[GNU Project]]'s [[GNU Debugger]], and miscellaneous utilities.
MinGW includes a [[porting|port]] of the [[GNU Compiler Collection]] (GCC), [[GNU Binutils]] for Windows ([[assembler (computing)|assembler]], [[linker (computing)|linker]], [[Archive file|archive manager]]), a set of freely distributable Windows specific [[header file]]s and [[Static library|static import libraries]] which enable the use of the [[Windows API]], a Windows native build of the [[GNU Project]]'s [[GNU Debugger]], and miscellaneous utilities.


MinGW does not rely on [[Third-party software component|third-party]] [[C (programming language)|C]] [[Runtime library|runtime]] [[dynamic-link library]] (DLL) files, and because the runtime libraries are not distributed using the [[GNU 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.<ref>{{cite web
MinGW does not rely on [[Third-party software component|third-party]] [[C (programming language)|C]] [[Runtime library|runtime]] [[dynamic-link library]] (DLL) files, and because the runtime libraries are not distributed using the [[GNU 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.<ref>{{cite web
| url= http://mingw.org/wiki/MinGW
| url=http://mingw.org/wiki/MinGW
| website=MinGW.org/wiki
| website=MinGW.org/wiki
| title=(MinGW on) MinGW
| title=(MinGW on) MinGW
| date=2008-07-07
| date=2008-07-07
| accessdate=2013-10-16
| access-date=2013-10-16
| archive-date=2013-10-06
| archive-url=https://web.archive.org/web/20131006143341/http://mingw.org/wiki/MinGW
| url-status=dead
}}</ref>
}}</ref>


MinGW can be run either on the native Microsoft Windows platform, cross-hosted on [[Linux]] (or other Unix), or "cross-native" on [[Cygwin]]. Although programs produced under MinGW are 32-bit executables, they can be used both in 32 and 64-bit versions of Windows.
MinGW can be run either on the native Microsoft Windows platform, cross-hosted on [[Linux]] (or other Unix), or "cross-native" on [[Cygwin]]. 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 [[software forking|forked]] with the creation in 2005–2008 of an alternative project called [[Mingw-w64]].


==History==
==History==
Line 37: Line 47:
| publisher=Free Software Foundation
| publisher=Free Software Foundation
| at=5.5 Portability between System Types
| at=5.5 Portability between System Types
| accessdate=July 1, 2013
| access-date=July 1, 2013
}}</ref><ref>{{cite mailing list
}}</ref><ref>{{cite mailing list
| url=https://lists.gnu.org/archive/html/libtool/2000-09/msg00000.html
| url=https://lists.gnu.org/archive/html/libtool/2000-09/msg00000.html
| title=Libtool Re: Naming a project gnu-win32?
| title=Libtool Re: Naming a project gnu-win32?
| date=2000-09-18
| date=2000-09-18
| accessdate=2013-05-21
| access-date=2013-05-21
| mailinglist=libtool
| mailing-list=libtool
| last=Stallman | first=Richard |authorlink=Richard Stallman
| last=Stallman | first=Richard |author-link=Richard Stallman
}}</ref> The numbers were dropped in order to avoid the implication that it would be limited to producing [[32-bit application|32-bit binaries]]. Colin Peters authored the initial release in 1998, consisting only of a Cygwin port of GCC.<ref name="history">{{cite web
}}</ref> The numbers were dropped in order to avoid the implication that it would be limited to producing [[32-bit application|32-bit binaries]]. Colin Peters authored the initial release in 1998, consisting only of a Cygwin port of GCC.<ref name="history">{{cite web |title=History {{!}} MinGW |url=http://mingw.org/history |archive-url=https://web.archive.org/web/20120823025609/http://www.mingw.org:80/history |archive-date=2012-08-23 |access-date=2012-07-09 |publisher=MinGW.org}}</ref><ref name="potm"/> Jan-Jaap van der Heijden created a Windows-native port of GCC and added [[binutils]] and [[make (software)|make]].<ref name="history"/><ref name="potm"/> Mumit Khan later took over development, adding more Windows-specific features to the package, including the Windows system headers by Anders Norlander.<ref name="history"/><ref name="potm"/> In 2000, the project was moved to [[SourceForge]] in order to solicit more assistance from the community and centralize its development.<ref name="history"/><ref name="potm"/>
| url=http://mingw.org/history
| title=(MinGW's) History
| publisher=MinGW.org
| date=
| accessdate=2012-07-09
}}</ref><ref name="potm"/> Jan-Jaap van der Heijden created a Windows-native port of GCC and added [[binutils]] and [[make (software)|make]].<ref name="history"/><ref name="potm"/> Mumit Khan later took over development, adding more Windows-specific features to the package, including the Windows system headers by Anders Norlander.<ref name="history"/><ref name="potm"/> In 2000, the project was moved to [[SourceForge]] in order to solicit more assistance from the community and centralize its development.<ref name="history"/><ref name="potm"/>


MinGW was selected as Project of the Month at SourceForge for September 2005.<ref name="potm">{{cite web
MinGW was selected as Project of the Month at SourceForge for September 2005.<ref name="potm">{{cite web
Line 58: Line 62:
| publisher=SourceForge.net
| publisher=SourceForge.net
| date=2005-08-31
| date=2005-08-31
| accessdate=2012-07-09
| access-date=2012-07-09
}}</ref>
}}</ref>

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.


MSYS (a contraction of "Minimal System") was introduced as a [[Bourne shell]] command line interpreter system<ref>{{cite web
MSYS (a contraction of "Minimal System") was introduced as a [[Bourne shell]] command line interpreter system<ref>{{cite web
| accessdate = 2020-04-16
| access-date = 2020-04-16
| publisher = MinGW.org
| publisher = MinGW.org
| title = (wiki:) MSYS
| title = (wiki:) MSYS
| quote = MSYS, a contraction of "Minimal SYStem", is a Bourne Shell command line interpreter system.
| quote = MSYS, a contraction of "Minimal SYStem", is a Bourne Shell command line interpreter system.
| url = http://www.mingw.org/
| url = http://www.mingw.org/
| archive-date = 2006-08-28
| archive-url = https://web.archive.org/web/20060828091046/http://www.mingw.org/MinGWiki/index.php/GettingStarted
| url-status = dead
}}</ref> with the aim of better interoperability with native Windows software.
}}</ref> 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]].<ref>{{cite web | url=https://sourceforge.net/p/mingw/mailman/message/36198954/ | title=Announcement of migration to OSDN.net | website=sourceforge.net}}</ref>
In 2018, following a disagreement with SourceForge about the administration of its mailing lists, MinGW migrated to [[OSDN]].<ref>{{cite mailing list |url=https://sourceforge.net/p/mingw/mailman/message/36198954/ |title=Announcement of migration to OSDN.net |mailing-list=Mingw-users |date=January 21, 2018}}</ref>

=== 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]], based on Mingw-w64 and [[Cygwin]], that helps to deploy code from the [[Unix]] world on Windows.<ref>MSYS2: [https://www.msys2.org/ official homepage], [https://github.com/msys2 code repository]</ref>


==Programming language support==
==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 (programming language)|Ada]]. The GCC runtime libraries are used (libstdc++ for C++, libgfortran for Fortran, etc.).{{Citation needed|date=September 2020}}
Most languages supported by GCC are supported on the MinGW port as well. These include [[C (programming language)|C]], [[C++]], [[Objective-C]], [[Objective-C++]], [[Fortran]], and [[Ada (programming language)|Ada]]. The GCC runtime libraries are used (libstdc++ for C++, libgfortran for Fortran, etc.).{{Citation needed|date=September 2020}}


MinGW links by default to the Windows OS component library [[Microsoft Windows library files#MSVCRT.DLL and MSVCPP.DLL|MSVCRT]], which is the C library that [[Visual C++|Visual&nbsp;C]] 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 [[ANSI C|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.<ref>{{cite web
MinGW links by default to the Windows OS component library [[Microsoft Windows library files#MSVCRT.DLL and MSVCPP.DLL|MSVCRT]], which is the C library that [[Visual C++]] 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 [[ANSI C|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.<ref>{{cite web
| url=http://mingw.org/wiki/C99
| url=http://mingw.org/wiki/C99
| title=(MinGW And) C99
| title=(MinGW And) C99
| website = MinGW.org/wiki
| website=MinGW.org/wiki
| date=2010-06-21
| date=2010-06-21
| access-date=2011-03-29
}}</ref> [[Mingw-w64|Mingw-w64]] has resolved these issues, and provides fully POSIX compliant printf functionality.
| archive-date=2011-05-20
| archive-url=https://web.archive.org/web/20110520024432/http://www.mingw.org/wiki/C99
| url-status=dead
}}</ref> [[Mingw-w64]] has resolved these issues, and provides fully POSIX compliant printf functionality.


==Link compatibility==
==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.<ref>http://mingw.org/wiki/Interoperability_of_Libraries_Created_by_Different_Compiler_Brands</ref>
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.<ref>{{cite web |url=http://mingw.org/wiki/Interoperability_of_Libraries_Created_by_Different_Compiler_Brands |title=Interoperability of Libraries Created by Different Compiler Brands {{!}} MinGW |website=mingw.org |url-status=dead |archive-url=https://web.archive.org/web/20100612213014/http://mingw.org/wiki/Interoperability_of_Libraries_Created_by_Different_Compiler_Brands |archive-date=2010-06-12}} </ref>


==Components==
==Components==
Line 91: Line 104:
| title=(MinGW) FAQ
| title=(MinGW) FAQ
| publisher=MinGW.org
| publisher=MinGW.org
| date=
| access-date=2012-07-09
| archive-date=2008-11-21
| accessdate=2012-07-09
| archive-url=https://web.archive.org/web/20081121131941/http://www.mingw.org./mingwfaq.shtml#faq-what
| url-status=dead
}}</ref><ref name="MinGWComponents">{{cite web
}}</ref><ref name="MinGWComponents">{{cite web
| url=http://sourceforge.net/project/showfiles.php?group_id=2435
| url=http://sourceforge.net/project/showfiles.php?group_id=2435
| title=MinGW - Minimalist GNU for Windows
| title=MinGW - Minimalist GNU for Windows
| publisher=Sourceforge.net
| publisher=Sourceforge.net
| date=
| access-date=2012-07-09
| accessdate=2012-07-09
}}</ref> These utilities can be used from the [[Windows command line]] or integrated into an [[integrated development environment|IDE]]. Packages may be installed using the command line via mingw-get.<ref>{{cite web
}}</ref> These utilities can be used from the [[Windows command line]] or integrated into an [[integrated development environment|IDE]]. Packages may be installed using the command line via mingw-get.<ref>{{cite web
| title=MinGW Command Line Interface Installer
| title=MinGW Command Line Interface Installer
| url=http://www.mingw.org/wiki/Getting_Started#toc2
| url=http://www.mingw.org/wiki/Getting_Started#toc2
| accessdate=14 June 2012
| access-date=14 June 2012
| archive-date=15 June 2012
| archive-url=https://web.archive.org/web/20120615150900/http://www.mingw.org/wiki/Getting_Started#toc2
| url-status=dead
}}</ref>
}}</ref>


Line 109: Line 126:
In addition, a component of MinGW known as ''MSYS'' (''minimal system'') provides Windows ports of a lightweight Unix-like [[shell (computer science)|shell]] environment including [[rxvt]] and a selection of [[POSIX]] tools sufficient to enable [[autoconf]] scripts to run,<ref>{{cite web
In addition, a component of MinGW known as ''MSYS'' (''minimal system'') provides Windows ports of a lightweight Unix-like [[shell (computer science)|shell]] environment including [[rxvt]] and a selection of [[POSIX]] tools sufficient to enable [[autoconf]] scripts to run,<ref>{{cite web
| url = http://www.mingw.org/wiki/MSYS
| url = http://www.mingw.org/wiki/MSYS
| title=(wiki:) MSYS
| title = (wiki:) MSYS
| publisher=MinGW.org
| publisher = MinGW.org
| date=
| access-date = 2016-02-18
| accessdate = 2016-02-18
| archive-date = 2016-02-18
| archive-url = https://web.archive.org/web/20160218111823/http://www.mingw.org/wiki/msys
}}</ref> but it does not provide a C compiler or a [[Case_sensitivity#In_filesystems|case-sensitive file system]].<ref>{{cite web
| url-status = dead
| accessdate = 2016-02-18
}}</ref> but it does not provide a C compiler or a [[Case sensitivity#In filesystems|case-sensitive file system]].<ref>{{cite web
| access-date = 2016-02-18
| publisher = MinGW.org
| publisher = MinGW.org
| title = (wiki:) MSYS
| title = (wiki:) MSYS
| quote = 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.
| quote = 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.
| url = http://www.mingw.org/wiki/MSYS
| url = http://www.mingw.org/wiki/MSYS
| archive-date = 2016-02-18
| archive-url = https://web.archive.org/web/20160218111823/http://www.mingw.org/wiki/msys
| url-status = dead
}}</ref>
}}</ref>


Line 125: Line 147:
| title=(wiki:) mingwPORT
| title=(wiki:) mingwPORT
| publisher=MinGW.org
| publisher=MinGW.org
| date=
| access-date=2012-07-09
| accessdate=2012-07-09
| archive-date=2012-07-23
| archive-url=https://web.archive.org/web/20120723162737/http://www.mingw.org/wiki/mingwPORT
| url-status=dead
}}</ref>
}}</ref>


Line 133: Line 157:
| title=(MinGW) Licensing Terms
| title=(MinGW) Licensing Terms
| publisher=MinGW.org
| publisher=MinGW.org
| date=
| access-date=2012-07-09
| archive-date=2009-08-04
| accessdate=2012-07-09
| archive-url=https://web.archive.org/web/20090804133441/http://www.mingw.org/license
| url-status=dead
}}</ref> 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.
}}</ref> 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.


Line 142: Line 168:
| title=(MinGW:) About Cygwin
| title=(MinGW:) About Cygwin
| publisher=MinGW.org
| publisher=MinGW.org
| date=
| access-date=2012-07-09
| archive-date=2009-08-28
| accessdate=2012-07-09
| archive-url=https://web.archive.org/web/20090828110952/http://www.mingw.org/node/21
}}</ref> Cygwin aims to provide a complete [[POSIX]] layer comprising a full implementation of all major Unix system calls and libraries. Compatibility is considered higher priority than performance. On the other hand, MinGW's priorities are simplicity and performance. As such, it does not provide certain [[POSIX]] APIs which cannot easily be implemented using the Windows API, such as <code>[[Fork (operating system)|fork()]]</code>, <code>[[mmap|mmap()]]</code> and <code>[[ioctl|ioctl()]]</code>.<ref name="differencesCygwinMinGW" /> Applications written using a [[cross-platform]] library that has itself been ported to MinGW, such as [[Simple DirectMedia Layer|SDL]], [[wxWidgets]], [[Qt (toolkit)|Qt]], or [[GTK]], will usually compile as easily in MinGW as they would in Cygwin.
| url-status=dead
}}</ref> Cygwin aims to provide a complete [[POSIX]] 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]] APIs which cannot easily be implemented using the Windows API, such as <code>[[Fork (operating system)|fork()]]</code>, <code>[[mmap|mmap()]]</code> and <code>[[ioctl|ioctl()]]</code>.<ref name="differencesCygwinMinGW" /> Applications written using a [[cross-platform]] library that has itself been ported to MinGW, such as [[Simple DirectMedia Layer|SDL]], [[wxWidgets]], [[Qt (toolkit)|Qt]], or [[GTK]], will usually compile as easily in MinGW as they would in Cygwin.


Windows programs written with Cygwin run on top of a [[copyleft]]ed compatibility [[Microsoft Dynamic Link Library|DLL]] that must be distributed with the program, along with the program's source code. MinGW does not require a [[compatibility layer]], since MinGW-based programs are compiled with direct calls to Windows APIs.
Windows programs written with Cygwin run on top of a [[copyleft]]ed compatibility [[Microsoft Dynamic Link Library|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]], 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 [[Windows Registry|registry]] or files on the computer.
The combination of MinGW and MSYS provides a small, self-contained environment that can be loaded onto removable media without leaving entries in the [[Windows Registry|registry]] or files on the computer.


It is also possible to [[cross compiler|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.
It is also possible to [[cross compiler|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.

== See also ==
*[[Cygwin]]
*[[Windows Subsystem for Linux]]
*[[Mingw-w64]]


==References==
==References==
Line 156: Line 189:


==External links==
==External links==
* [http://mingw.org/ official MinGW website]
* [https://web.archive.org/web/20230804222945/http://mingw.osdn.io/index.html Official MinGW website]
* [http://mingw-w64.org/ official Mingw-w64 website]
* [https://www.msys2.org/ official MSYS2 website]
* [https://nuwen.net/mingw.html nuwen 64-bit MinGW distro] - maintained by a [https://nuwen.net/stl.html Microsoft employee]
* [https://nuwen.net/mingw.html nuwen 64-bit MinGW distro] - maintained by a [https://nuwen.net/stl.html Microsoft employee]
* [https://mxe.cc/ MXE] - Makefiles to build MinGW on Unix and many common dependencies libraries, pre-built packages available


{{Software in the Public Interest}}
{{Software in the Public Interest}}

Latest revision as of 13:07, 23 May 2024

MinGW
Original author(s)Colin Peters
Developer(s)MinGW Project
Initial releaseJuly 1, 1998; 26 years ago (1998-07-01)
Stable release
GNU BinUtils—2.32-1, Installation Manager—0.6.3, WSL—5.4.2[1] / April 12, 2021; 3 years ago (2021-04-12)
Repositoryosdn.net/projects/mingw/scm/
Written inC, C++
Operating systemMicrosoft Windows, Unix-like (as a cross compiler)
TypeCompiler
LicensePublic domain (headers), GNU General Public License (compiler and toolchain)
Websiteosdn.net/projects/mingw

MinGW ("Minimalist GNU for Windows"), formerly mingw32, is a free and open source software development environment to create Microsoft Windows applications.

MinGW 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 Project's GNU Debugger, and miscellaneous utilities.

MinGW does not rely on third-party C runtime dynamic-link library (DLL) files, and because the runtime libraries are not distributed using the GNU 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.[2]

MinGW can be run either on the native Microsoft Windows platform, cross-hosted on Linux (or other Unix), or "cross-native" on Cygwin. 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

[edit]

MinGW was originally called mingw32 ("Minimalist GNU for W32"), following the GNU convention whereby Windows is shortened as "W32".[3][4] 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.[5][6] Jan-Jaap van der Heijden created a Windows-native port of GCC and added binutils and make.[5][6] Mumit Khan later took over development, adding more Windows-specific features to the package, including the Windows system headers by Anders Norlander.[5][6] In 2000, the project was moved to SourceForge in order to solicit more assistance from the community and centralize its development.[5][6]

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

MSYS (a contraction of "Minimal System") was introduced as a Bourne shell command line interpreter system[7] 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.[8]

Fork

[edit]

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, based on Mingw-w64 and Cygwin, that helps to deploy code from the Unix world on Windows.[9]

Programming language support

[edit]

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.).[citation needed]

MinGW links by default to the Windows OS component library MSVCRT, which is the C library that Visual C++ 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-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.[10] Mingw-w64 has resolved these issues, and provides fully POSIX compliant printf functionality.

[edit]

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.[11]

Components

[edit]

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.[12][13] 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.[14]

MinGW supports dynamic libraries named according to the <name>.lib and <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,[15] but it does not provide a C compiler or a case-sensitive file system.[16]

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.[17]

The implementation of Windows system headers and static import libraries are released under a permissive license,[18] 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

[edit]

Although both Cygwin and MinGW can be used to port Unix software to Windows, they have different approaches:[19] Cygwin aims to provide a complete POSIX 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 APIs which cannot easily be implemented using the Windows API, such as fork(), mmap() and ioctl().[19] 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.

Windows programs written with Cygwin run on top of a copylefted 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, 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 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

[edit]

References

[edit]
  1. ^ "Download Package list". osdn.net. Retrieved 2023-02-04.
  2. ^ "(MinGW on) MinGW". MinGW.org/wiki. 2008-07-07. Archived from the original on 2013-10-06. Retrieved 2013-10-16.
  3. ^ "GNU Coding Standards". gnu.org. Free Software Foundation. April 27, 2013. 5.5 Portability between System Types. Retrieved July 1, 2013.
  4. ^ Stallman, Richard (2000-09-18). "Libtool Re: Naming a project gnu-win32?". libtool (Mailing list). Retrieved 2013-05-21.
  5. ^ a b c d "History | MinGW". MinGW.org. Archived from the original on 2012-08-23. Retrieved 2012-07-09.
  6. ^ a b c d e "(sourceforge's) Project of the Month". SourceForge.net. 2005-08-31. Retrieved 2012-07-09.
  7. ^ "(wiki:) MSYS". MinGW.org. Archived from the original on 2006-08-28. Retrieved 2020-04-16. MSYS, a contraction of "Minimal SYStem", is a Bourne Shell command line interpreter system.
  8. ^ "Announcement of migration to OSDN.net". Mingw-users (Mailing list). January 21, 2018.
  9. ^ MSYS2: official homepage, code repository
  10. ^ "(MinGW And) C99". MinGW.org/wiki. 2010-06-21. Archived from the original on 2011-05-20. Retrieved 2011-03-29.
  11. ^ "Interoperability of Libraries Created by Different Compiler Brands | MinGW". mingw.org. Archived from the original on 2010-06-12.
  12. ^ "(MinGW) FAQ". MinGW.org. Archived from the original on 2008-11-21. Retrieved 2012-07-09.
  13. ^ "MinGW - Minimalist GNU for Windows". Sourceforge.net. Retrieved 2012-07-09.
  14. ^ "MinGW Command Line Interface Installer". Archived from the original on 15 June 2012. Retrieved 14 June 2012.
  15. ^ "(wiki:) MSYS". MinGW.org. Archived from the original on 2016-02-18. Retrieved 2016-02-18.
  16. ^ "(wiki:) MSYS". MinGW.org. Archived from the original on 2016-02-18. Retrieved 2016-02-18. 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.
  17. ^ "(wiki:) mingwPORT". MinGW.org. Archived from the original on 2012-07-23. Retrieved 2012-07-09.
  18. ^ "(MinGW) Licensing Terms". MinGW.org. Archived from the original on 2009-08-04. Retrieved 2012-07-09.
  19. ^ a b "(MinGW:) About Cygwin". MinGW.org. Archived from the original on 2009-08-28. Retrieved 2012-07-09.
[edit]