git-bash and MinGW64 in git client in Windows environment

After installing the git client under the Windows 10 operating system, we can open a shell through git-bash.exe:

Execute some commands in the linux system:

Note the purple MINGW64 above  .

Mingw-w64 is an improved version of the original mingw.org project aimed at supporting the GCC compiler on Windows systems. It forked it in 2007 to provide support for 64-bit and new APIs. Since then, it has been widely used and distributed.

The so-called MinGW ("Minimalist GNU for Windows"), formerly known as mingw32, is a free and open source software development environment for creating Microsoft Windows applications. A replacement project called Mingw-w64 was created between 2005 and 2008 as a development fork of the MinGW project.

MinGW includes a port of the GNU Compiler Collection (GCC), GNU Binutils for Windows (assembler, linker, archive manager), a freely distributable set of Windows-specific header files and static import libraries that support the use of Native builds of the Windows API, the GNU Debugger for Windows GNU Project, and other utilities.

MinGW does not rely on third-party C runtime dynamic-link library (DLL) files, and since the runtime library is not distributed under the GNU General Public License (GPL), there is no need to distribute source code with the resulting program, unless otherwise specified in the program. Where the GPL library is used.

MinGW can run either natively on the Microsoft Windows platform, cross-hosted on Linux (or other Unixes), or "cross-native" on Cygwin. Although programs built under MinGW are 32-bit executables, they can be used in both 32-bit and 64-bit versions of Windows.

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 layer, including complete implementations of all major Unix system calls and libraries. Compatibility is considered more important than performance.
  • On the other hand, MinGW's priorities are simplicity and performance. As such, it does not provide some POSIX APIs, such as fork(), mmap(), and ioctl(), that cannot be easily implemented using the Windows API.

Applications written using cross-platform libraries that have themselves been ported to MinGW, such as SDL, wxWidgets, Qt, or GTK, will usually be as easy to compile in MinGW as in Cygwin.

Windows programs written in Cygwin run on a copyleft compatible 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 by calling Windows APIs directly.

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 to install Windows with MSYS to compile software that runs on Windows with or without Cygwin.

 

Guess you like

Origin blog.csdn.net/weixin_48345177/article/details/131932560