Mingw-w64 is a
free and open source
Free and open-source software (FOSS) is a term used to refer to groups of software consisting of both free software and open-source software where anyone is freely licensed to use, copy, study, and change the software in any way, and the source ...
software development
Software development is the process of conceiving, specifying, designing, programming, documenting, testing, and bug fixing involved in creating and maintaining applications, frameworks, or other software components. Software development invol ...
environment to create (
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 an Android smartphone is a cross c ...
)
Microsoft Windows
Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for serv ...
PE applications. It was
forked in 2005–2010 from
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 ...
(''Minimalist GNU for Windows'').
Mingw-w64 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 Ham ...
of the
GNU Compiler Collection
The GNU Compiler Collection (GCC) is an optimizing compiler produced by the GNU Project supporting various programming languages, hardware architectures and operating systems. The Free Software Foundation (FSF) distributes GCC as free software ...
(GCC),
GNU Binutils
The GNU Binary Utilities, or , are a set of programming tools for creating and managing binary programs, object files, libraries, profile data, and assembly source code.
Tools
They were originally written by programmers at Cygnus Solutions.
...
for Windows (
assembler
Assembler may refer to:
Arts and media
* Nobukazu Takemura, avant-garde electronic musician, stage name Assembler
* Assemblers, a fictional race in the ''Star Wars'' universe
* Assemblers, an alternative name of the superhero group Champions of A ...
,
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
Many programming languages and other computer files have a directive, often called include (sometimes copy or import), that causes the contents of the specified file to be inserted into the original file. These included files are called copybooks ...
s and
static import libraries which enable the use of the
Windows API
The Windows API, informally WinAPI, is Microsoft's core set of application programming interfaces (APIs) available in the Microsoft Windows operating systems. The name Windows API collectively refers to several different platform implementations th ...
, 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 computing devices by collaborati ...
'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, C, C++, Objective-C, Free Pascal, Fortran, Go, and partially others.
History
GDB was first written by ...
, and miscellaneous utilities.
Mingw-w64 can be run either on the native Microsoft Windows platform, cross-hosted on
Linux
Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, which ...
(or other Unix), or "cross-native" on
MSYS2
Mingw-w64 is a free and open source software development environment to create ( cross-compile) Microsoft Windows PE applications. It was forked in 2005–2010 from MinGW (''Minimalist GNU for Windows'').
Mingw-w64 includes a port of the GNU C ...
or
Cygwin
Cygwin ( ) is a POSIX-compatible programming and runtime environment that runs natively on Microsoft Windows. Under Cygwin, source code designed for Unix-like operating systems may be compiled with minimal modification and executed.
The Cygwin in ...
. Mingw-w64 can generate 32 bit and 64-bit executables for x86 under the target names and .
History
In 2005, Mingw-w64 was created by OneVision Software under
cleanroom software engineering
The cleanroom software engineering process is a software development process intended to produce software with a certifiable level of reliability. The cleanroom process was originally developed by Harlan Mills and several of his colleagues i ...
principles, since the original MinGW project was not prompt on updating its code base, including the inclusion of several key new APIs and also much needed 64-bit support. In 2008, OneVision then donated the code to Kai Tietz, one of its lead developers, under the condition that it remains 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 not to attempt further cooperation with MinGW.
MinGW-w64 provides a more complete Win32 API implementation, including:
* Better
C99
C99 (previously known as C9X) is an informal name for ISO/IEC 9899:1999, a past version of the C programming language standard. It extends the previous version ( C90) with new features for the language and the standard library, and helps impl ...
support
*
POSIX Threads
POSIX Threads, commonly known as pthreads, is an execution model that exists independently from a language, as well as a parallel execution model. It allows a program to control multiple different flows of work that overlap in time. Each flow of ...
(pthreads) support (including the possibility to enable
C++11
C++11 is a version of the ISO/IEC 14882 standard for the C++ programming language. C++11 replaced the prior version of the C++ standard, called C++03, and was later replaced by C++14. The name follows the tradition of naming language versions by ...
thread-related functionality in GCC's
libstdc++ #REDIRECT C++ Standard Library
The C standard library or libc is the standard library for the C programming language, as specified in the ISO C standard. ISO/IEC (2018). '' ISO/IEC 9899:2018(E): Programming Languages - C §7'' Starting from the or ...
)
* GCC multilib, which allows users to install 32-bit and 64-bit libraries in parallel
*
Unicode
Unicode, formally The Unicode Standard,The formal version reference is is an information technology Technical standard, standard for the consistent character encoding, encoding, representation, and handling of Character (computing), text expre ...
entry point (wmain/wWinMain)
*
DDK (from
ReactOS
ReactOS is a free and open-source operating system for amd64/i686 personal computers intended to be binary-compatible with computer programs and device drivers made for Windows Server 2003 and later versions of Windows. ReactOS has been noted a ...
)
*
DirectX
Microsoft DirectX is a collection of application programming interfaces (APIs) for handling tasks related to multimedia, especially game programming and video, on Microsoft platforms. Originally, the names of these APIs all began with "Direct", ...
(from
Wine
Wine is an alcoholic drink typically made from fermented grapes. Yeast consumes the sugar in the grapes and converts it to ethanol and carbon dioxide, releasing heat in the process. Different varieties of grapes and strains of yeasts are m ...
)
*
Large file support
Large-file support (LFS) is the term frequently applied to the ability to create files larger than either 2 or 4 GiB on 32-bit filesystems.
Details
Traditionally, many operating systems and their underlying file system implementations use ...
*
Win64
The Windows API, informally WinAPI, is Microsoft's core set of application programming interfaces (APIs) available in the Microsoft Windows operating systems. The name Windows API collectively refers to several different platform implementations th ...
support
*
Structured Exception Handling The Microsoft Windows family of operating systems employ some specific exception handling mechanisms.
Structured Exception Handling
Microsoft Structured Exception Handling is the native exception handling mechanism for Windows and a forerunner te ...
(SEH) instead of
DWARF
Dwarf or dwarves may refer to:
Common uses
*Dwarf (folklore), a being from Germanic mythology and folklore
* Dwarf, a person or animal with dwarfism
Arts, entertainment, and media Fictional entities
* Dwarf (''Dungeons & Dragons''), a humanoid ...
or
sjlj on x86-64 (from gcc 4.8+)
* Some useful tools such as
gendef
(an improved version of MinGW's
pexports
utility), and
widl
(an
MIDL
Microsoft Interface Definition Language (MIDL) is a text-based interface description language from Microsoft, based on the DCE/RPC IDL which it extends for use with the Microsoft Component Object Model. Its compiler is also called MIDL.
See also ...
compiler from Wine).
Additionally, the Mingw-w64 project maintains winpthreads, a
wrapper library
Wrapper libraries (or library wrappers) consist of a thin layer of code (a "shim") which translates a library's existing interface into a compatible interface. This is done for several reasons:
* To refine a poorly designed or complicated interfac ...
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
,
, and
.
MSYS2
MSYS2 ("minimal system 2") is a software distribution and a development platform for
Microsoft Windows
Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for serv ...
, based on Mingw-w64 and
Cygwin
Cygwin ( ) is a POSIX-compatible programming and runtime environment that runs natively on Microsoft Windows. Under Cygwin, source code designed for Unix-like operating systems may be compiled with minimal modification and executed.
The Cygwin in ...
, that helps to deploy code from the
Unix
Unix (; trademarked as UNIX) is a family of multitasking, multiuser 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, and ot ...
world on Windows. It plays the same role the old MSYS did in MinGW.
MSYS2 shares this goal of bringing Unix code to Windows machines with several other projects, most notably
Cygwin
Cygwin ( ) is a POSIX-compatible programming and runtime environment that runs natively on Microsoft Windows. Under Cygwin, source code designed for Unix-like operating systems may be compiled with minimal modification and executed.
The Cygwin in ...
and
Windows Subsystem for Linux
Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for serv ...
(WSL). WSL lets Linux
ELF
An elf () is a type of humanoid supernatural being in Germanic mythology and folklore. Elves appear especially in North Germanic mythology. They are subsequently mentioned in Snorri Sturluson's Icelandic Prose Edda. He distinguishes "ligh ...
binaries run on Windows through a managed
Virtual Machine
In computing, a virtual machine (VM) is the virtualization/emulation of a computer system. Virtual machines are based on computer architectures and provide functionality of a physical computer. Their implementations may involve specialized hardw ...
. Cygwin provides a full
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 both the system- and user-level application programming interf ...
environment (as a windows
DLL) in which applications, compiled as Windows EXEs, run as they would under Unix.
Instead of providing a full environment like Cygwin does, MSYS2 tasks itself with being a development and deployment platform.
[
* There is a main MSYS2 environment (similar to, and in fact derived from, Cygwin's emulation code) with package manager and standard Unix system tool. This way, when managing MSYS2 itself, standard Unix tools can be used unmodified by using the emulated environment. It's also possible to install build tools in the MSYS2 emulated environment in case the user wants to build software that depends on the POSIX emulation layer instead of the native API.
* In addition, four environments are provided containing native compilers, build tools and libraries that can be directly used to build native Windows 32-bit or 64-bit programs. The final programs built with the two native environments don't use any kind of emulation and can run or be distributed like native Windows programs. The environments are MINGW64 and MINGW32 (the original MinGW-w64 environments using gcc, msvcrt, and libstdc++), UCRT64 (adaptation of MINGW64 to ucrt), and CLANG64 (adaptation of UCRT64 to clang and libc++). While Cygwin also provides MinGW-w64 compilers and libraries, the set of available libraries is smaller, and they are not as easily managed due to not being placed in separate prefixes.
The main MSYS2 environment provides a ]package manager
A package manager or package-management system is a collection of software tools that automates the process of installing, upgrading, configuring, and removing computer programs for a computer in a consistent manner.
A package manager deals wi ...
(''Pacman'' from Arch Linux
Arch Linux () is an independently developed, x86-64 general-purpose Linux distribution that strives to provide the latest stable versions of most software by following a Rolling release, rolling-release model. The default installation is a minim ...
), a bash shell
Bash is a Unix shell and command language written by Brian Fox for the GNU Project as a free software replacement for the Bourne shell. First released in 1989, it has been used as the default login shell for most Linux distributions. Bash was o ...
, and other Unix
Unix (; trademarked as UNIX) is a family of multitasking, multiuser 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, and ot ...
programs. It uses a runtime library ''msys-2.0.dll'' (~20MB) that is derived from the Cygwin library ''cygwin1.dll'', and is updated regularly to keep track of the Cygwin development. It is intended as a development environment, one that developers can manage (using pacman) and run their tools with. Features judged unnecessary for development are removed.
As with Cygwin, MSYS2 supports path translation for non-MSYS2 software launched from it. For example one can use the command to launch an editor that will open the file with the Windows path .[
MSYS2 and its bash environment is used by ]Git
Git () is a distributed version control system: tracking changes in any set of files, usually used for coordinating work among programmers collaboratively developing source code during software development. Its goals include speed, data in ...
and GNU Octave
GNU Octave is a high-level programming language primarily intended for scientific computing and numerical computation. Octave helps in solving linear and nonlinear problems numerically, and for performing other numerical experiments using a langu ...
for their official Windows distribution.
Compiler
Most languages supported by GCC are supported on the Mingw-w64 port as well. These include C, C++
C++ (pronounced "C plus plus") is a high-level general-purpose programming language created by Danish computer scientist Bjarne Stroustrup as an extension of the C programming language, or "C with Classes". The language has expanded significan ...
, Objective-C
Objective-C is a general-purpose, object-oriented programming language that adds Smalltalk-style messaging to the C programming language. Originally developed by Brad Cox and Tom Love in the early 1980s, it was selected by NeXT for its NeXTS ...
, Objective-C++, Fortran, and Ada
Ada may refer to:
Places
Africa
* Ada Foah, a town in Ghana
* Ada (Ghana parliament constituency)
* Ada, Osun, a town in Nigeria
Asia
* Ada, Urmia, a village in West Azerbaijan Province, Iran
* Ada, Karaman, a village in Karaman Province, ...
. The GCC runtime libraries are used (libstdc++ for C++, libgfortran for Fortran, etc.). A packaging of LLVM
LLVM is a set of compiler and toolchain technologies that can be used to develop a front end for any programming language and a back end for any instruction set architecture. LLVM is designed around a language-independent intermediate represen ...
's clang to mingw-w64 is also provided by MSYS2. It supports ARM for Windows ( and ).
Binaries (executables or DLLs) generated with different C++ compilers (like Mingw-w64 GCC and Visual Studio) are in general not link compatible due to the use of different ABIs and name mangling
In compiler construction, name mangling (also called name decoration) is a technique used to solve various problems caused by the need to resolve unique names for programming entities in many modern programming languages.
It provides a way of e ...
schemes caused by the differences in C++ runtimes. However, compiled C code is link compatible. Clang is an exception, as it mostly supports MSVC's C++ ABI on Windows.
The binutils
The GNU Binary Utilities, or , are a set of programming tools for creating and managing binary programs, object files, libraries, profile data, and assembly source code.
Tools
They were originally written by programmers at Cygnus Solutions.
...
documentation has up-to-date information about its handling of various windows-specific formats and special tools for doing so.
References
External links
*
MSYS2
MXE
- Makefiles to build MinGW on Unix and many common dependencies libraries targeting Win32/64, pre-built packages available
{{Unix-Windows interoperability
2005 software
C (programming language) compilers
C++ compilers
Cross-compilers
Fortran compilers
Free compilers and interpreters
Public-domain software