What is mingw
If you just want to get the mingw-w64 compiler without all this MSYS stuff, you can download those compilers from the mingw-w64 website.
#What is mingw install#
To use this environment you should first install the MinGW compiler using pacman: pacman -S mingw-w64-i686-toolchain I like that you can use Microsoft APIs like WinUSB, and also have all the language features from the latest version of GCC. I like that the compiled executables can stand alone, without needing msys-2.0.dll. The MinGW-w64 Win32 Shell is my preferred environment for compiling the cross-platform, Windows-aware programs that I want to write. A lot of utilities on the PATH, like "ls" and "make", are MSYS programs (they depends on msys-2.0.dll), but that is fine. You can see all the differences in the two shells by looking at the use of the MSYSTEM variable in /etc/profile. The main difference is that "/mingw32/bin" is prepended to the path, and a few other environment variables are adjusted as well. The MinGW-w64 Win32 Shell is very similar to the MSYS2 Shell. These newers DLLs might provide features that are unavailable in MinGW. Visual Studio) use newer C run-time DLLs with numbers in the name, like MSVCR110.DLL.
It is important to note that newer versions of the Microsoft development tools (i.e. Click on "Alphabetical Function Reference" in that document to find specific functions. I think that the features of POSIX that are available mostly come from MSVCRT.DLL, and these features are documented in the Run-time Library Reference for Visual Studio. For example, fork is not available, and fstat always returns a 0 in st_ino field. The features of POSIX available to you in this environment are more limited. This makes me think that most people don't compile Windows-aware applications in this environment, and instead use one of the other environments. According to Elieux, the -mwin32 option is not really used in the MSYS2 project, so most of these utilities are probably "unaware" that they are running on Windows.Īs of, compile-time errors prevent you from using Microsoft's setupapi.h from this environment. Most of the utilities provided by MSYS2 were probably compiled using the MSYS2 environment if you run Dependency Walker and look at those utilities, you can see that they depend on msys-2.0.dll. For example, if you wanted to compile the latest version of GNU Grep, you should use the MSYS2 Shell.
#What is mingw windows#
The MSYS2 Shell is useful for compiling GNU utilities, applications that use advanced features of POSIX, or just generally any application that was not designed with Windows in mind.
It doesn't define the _WIN32 preprocessor macro by default, but it will if you provide the -mwin32 options. That DLL is a fork of Cygwin, so it provides good POSIX The executables compiled by gcc in the MSYS2 Shell depend on msys-2.0.dll. In each environment, theĬompiler is invoked by running "gcc". That they each provide a different compiler. The main difference between these environments is The MSYS2 environment actually supports multiple different MSYS2 development environment for WindowsĪs of 2015, the best general purpose development environment for C/C++ programs on Windows seems to be