MinGW (Minimalist GNU for Windows) is a free and open-source development environment that enables the creation of native Windows applications using the GNU Compiler Collection (GCC). It provides a port of GCC, binutils, Windows system headers, and static import libraries, allowing C, C++, Fortran, and other languages to be compiled directly for Windows without requiring a POSIX compatibility layer like Cygwin.
The original MinGW project has largely been superseded by MinGW-w64, a fork created in 2007 to support 64-bit Windows and modern APIs. MinGW-w64 is now the recommended choice for new projects, offering full support for 32-bit and 64-bit Windows, C99 and C++11/14/17/20 standards, and better runtime performance.
Key Features of MinGW-w64:
Native Windows binaries (PE32/PE64 format) with no external dependencies.
Supports MSVCRT (legacy) and UCRT (universal C runtime) runtimes.
Includes Winpthreads for C++11 threading support.
Compatible with IDEs like Visual Studio Code, Code::Blocks, and Eclipse.
Widely used in tools such as MATLAB, Embarcadero Dev-C++, and MSYS2.
Where to Download:
Official site: https://www.mingw-w64.org/
SourceForge mirror: https://sourceforge.net/projects/mingw-w64/
Note: Avoid the outdated "MinGW" (mingw.org) project—use MinGW-w64 instead. For modern development, consider using MSYS2, which provides an easy package manager and updated toolchain.
could not install mingw c compiler for windows 64 bit - Stack Overflow
What is MinGW, why there is a lot of compilers and why this is so confusing?
c++ - Installing the latest version of mingw-w64 on Windows - Stack Overflow
Where to download Mingw?
Videos
Factsheet
Sourceforge still contains broken builds because nobody maintains the download links. Instead you can download from here: https://winlibs.com/.
- You'll want the Win 64 build with UCRT "C runtime" (the older MSVCRT was plain bad).
- Then pick a gcc version and thread model after preference - if you wish to do Windows programming then MCF threads, if you wish to emulate Linux then POSIX threads. If you aren't planning on multi-threading (still beginner) then it doesn't matter which thread model you pick.
https://sourceforge.net/projects/mingw/
download from this resource and then install .
I am interested in learning to program in C++. I have noticed that it requires a compiler, but there are a lot of options available, which confuses me a little. I have heard about MinGW, but I find it difficult to determine which page to download it from, as there are several options such as winlibs, sourceforge, and mingw-w64.org, and I am not sure which one is the official one. Furthermore, once on the mingw-w64 page, I find that there are multiple versions such as Cygwin, LLVM-MinGW, w64devkit, MingW-W64-builds, MSYS2, and WinLibs.com, which further complicates my decision. I wonder why there isn't a standard official compiler to avoid this confusion and what exactly MinGW is, and how the available compilers such as GCC or Clang differ. I would appreciate any guidance on which one to choose and please excuse my lack of knowledge on the subject.
GCC 10 is officially released. The personal build for Windows (MinGW-w64) that can be downloaded from https://winlibs.com requires no installation, just extract to a folder.
Building GCC on Windows from source code is very difficult and cannot be recommended to beginners. Moreover, GCC 10 has not yet been officially released and you may need to wait a few more weeks to get it.
If you want an up-to-date GCC in Windows (currently version 9.3), I recommend downloading and installing the MSYS2 package. Once you install it, launch it using the "MinGW64" icon and install the correct compiler in the terminal. For details, see this question: How to install MinGW-w64 and MSYS2?
Once you have done this, you can forget about MSYS2 and simply use the directory with the binaries in your PATH.
The maintainers of MSYS2 are very keen in supporting bleeding edge software, so once GCC 10 is released, you will be able to update to it (using the command pacman -Syu)
very soon.
