Mingw-w64


Mingw-w64 is a free and open source software development environment to create Microsoft Windows applications. It was forked in 2005–2008 from MinGW.
Mingw-w64 includes a port of the GNU Compiler Collection, GNU Binutils for Windows, 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-w64 can be run either on the native Microsoft Windows platform, cross-hosted on Linux, or "cross-native" on MSYS2 or Cygwin. Mingw-w64 can generate 32- and 64-bit executables for x86 under the target names and.

History

In 2005, Mingw-w64 was created by OneVision Software under clean room design principles, since the original MinGW project was not prompt on updating its code base, including the inclusion of several key new APIs and the 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:
Additionally, the Mingw-w64 project maintains winpthreads, a wrapper library 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 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.
MSYS2 shares this goal of bringing Unix code to Windows machines with several other projects, most notably Cygwin and Windows Subsystem for Linux. WSL lets Linux ELF binaries run on Windows, with limited support for kernel calls and significant limitations in graphical applications. Cygwin provides a full POSIX environment 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. MSYS2 installs 3 sets of environments, each with a separate set of programs and libraries. Two of them, called 32-bit MinGW-w64 and 64-bit MinGW-w64, are simply composed of 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 third environment installed, called MSYS2, instead provides an emulated POSIX environment, like Cygwin, with a package manager and standard Unix system tools. 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.
The main MSYS2 environment provides a package manager, a bash shell, and other Unix programs. It uses a runtime library msys-2.0.dll 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 manager 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 and GNU Octave 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++, Fortran, and Ada. The GCC runtime libraries are used. A packaging of LLVM's clang to mingw-w64 is also provided by MSYS2. It supports ARM for Windows.
Binaries generated with different C++ compilers are in general not link compatible due to the use of different ABIs and name mangling 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 documentation has up-to-date information about its handling of various windows-specific formats and special tools for doing so.