MinGW-w64
   HOME

TheInfoList



OR:

Mingw-w64 is a
free and open-source Free and open-source software (FOSS) is software available under a Software license, 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 ...
suite of development tools that generate
Portable Executable The Portable Executable (PE) format is a file format for executables, object file, object code, Dynamic-link library, dynamic-link-libraries (DLLs), and binary files used on 32-bit and 64-bit Microsoft Windows, Windows operating systems, as well ...
(PE) binaries 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 ...
. 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 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 The GNU Binary Utilities, or , is a collection of programming tools maintained by the GNU Project for working with executable code including assembly, linking and many other development operations. The tools are originally from Cygnus Solut ...
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 for 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 version 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-w64 can be run natively on Microsoft Windows, 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 MSYS2 or
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 ...
. 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 central principles are software development based on formal methods, incremental implementati ...
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 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 not to attempt further cooperation with MinGW. MinGW-w64 provides a more complete Win32 API implementation, including: * Better
C99 C99 (previously C9X, formally ISO/IEC 9899:1999) is a past version of the C programming language open standard. It extends the previous version ( C90) with new features for the language and the standard library, and helps implementations mak ...
support *
POSIX Threads In computing, POSIX Threads, commonly known as pthreads, is an execution model that exists independently from a programming language, as well as a parallel execution model. It allows a program to control multiple different flows of work that ov ...
(pthreads) support (including the possibility to enable
C++11 C++11 is a version of a joint technical standard, ISO/IEC 14882, by the International Organization for Standardization (ISO) and International Electrotechnical Commission (IEC), for the C++ programming language. C++11 replaced the prior vers ...
thread-related functionality in GCC's
libstdc++ The GNU Compiler Collection (GCC) is a collection of compilers from the GNU Project that support various programming languages, hardware architectures, and operating systems. The Free Software Foundation (FSF) distributes GCC as free software ...
) * GCC multilib, which allows users to install 32-bit and 64-bit libraries in parallel *
Unicode Unicode or ''The Unicode Standard'' or TUS is a character encoding standard maintained by the Unicode Consortium designed to support the use of text in all of the world's writing systems that can be digitized. Version 16.0 defines 154,998 Char ...
entry point (wmain/wWinMain) * DDK (from
ReactOS ReactOS is a Free and open-source software, free and open-source operating system for i586/amd64 personal computers that is intended to be binary-code compatibility, binary-compatible with computer programs and device drivers developed for Wind ...
) *
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 made from Fermentation in winemaking, fermented fruit. Yeast in winemaking, Yeast consumes the sugar in the fruit and converts it to ethanol and carbon dioxide, releasing heat in the process. Wine is most often made f ...
) *
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 us ...
*
Win64 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 ...
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, dwarfs or dwarves may refer to: Common uses *Dwarf (folklore), a supernatural being from Germanic folklore * Dwarf, a human or animal with dwarfism Arts, entertainment, and media Fictional entities * Dwarf (''Dungeons & Dragons''), a sh ...
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. Version H ...
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 interfa ...
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 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. 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 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 ...
and
Windows Subsystem for Linux Windows Subsystem for Linux (WSL) is a component of Microsoft Windows that allows the use of a GNU/Linux environment from within Windows, foregoing the overhead of a virtual machine and being an alternative to dual booting. The WSL command-lin ...
(WSL). WSL lets Linux
ELF An elf (: elves) is a type of humanoid supernatural being in Germanic peoples, Germanic folklore. Elves appear especially in Norse mythology, North Germanic mythology, being mentioned in the Icelandic ''Poetic Edda'' and the ''Prose Edda'' ...
binaries run on Windows through a managed
Virtual Machine In computing, a virtual machine (VM) is the virtualization or emulator, emulation of a computer system. Virtual machines are based on computer architectures and provide the functionality of a physical computer. Their implementations may involve ...
. 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 application programming interfaces (APIs), along with comm ...
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 Open-source software, open source, rolling release Linux distribution. Arch Linux is kept up-to-date by regularly updating the individual pieces of software that it comprises. Arch Linux is intentionally minimal, and is meant ...
), a bash shell, and other
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 ...
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 that tracks versions of files. It is often used to control source code by programmers who are developing software collaboratively. Design goals of Git include speed, data integrity, and suppor ...
and
GNU Octave GNU Octave is a scientific programming language for scientific computing and numerical computation. Octave helps in solving linear and nonlinear problems numerically, and for performing other numerical experiments using a language that is mostly ...
for their official Windows distribution.


Compiler

Most languages supported by GCC are supported on the Mingw-w64 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++, Fortran, and
Ada Ada may refer to: Arts and entertainment * '' Ada or Ardor: A Family Chronicle'', a novel by Vladimir Nabokov Film and television * Ada, a character in 1991 movie '' Armour of God II: Operation Condor'' * '' Ada... A Way of Life'', a 2008 Bollywo ...
. The GCC runtime libraries are used (libstdc++ for C++, libgfortran for Fortran, etc.). A packaging of
LLVM LLVM, also called LLVM Core, is a target-independent optimizer and code generator. It can be used to develop a Compiler#Front end, frontend for any programming language and a Compiler#Back end, backend for any instruction set architecture. LLVM i ...
'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 means to 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 , is a collection of programming tools maintained by the GNU Project for working with executable code including assembly, linking and many other development operations. The tools are originally from Cygnus Solut ...
documentation has up-to-date information about its handling of various windows-specific formats and special tools for doing so.


References


External links


MSYS2

WinLibs

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 and open source compilers Public-domain software