🌐
mingw-w64
mingw-w64.org
mingw-w64
A complete runtime environment for GCC & LLVM for 32-bit (x86), 64-bit (x64), and ARM64 Windows
Source Code
A complete runtime environment for GCC & LLVM for 32-bit (x86), 64-bit (x64), and ARM64 Windows
Pre-built Toolchains
While mingw-w64 provides the core Windows headers and libraries needed for Windows development, it's not very useful on its own. Most users should install a pre-built toolchain that combines mingw-w64 with a compiler (like GCC with binutils, or LLVM/Clang) and other essential build components.
Changelog
Redirect access() to __mingw_access() on UCRT wrt to X_OK problems. New Hyper-V APIs. SEH based setjmp on ARM if supported by compiler. --enable-cfguard to enable Control Flow Guard in CRT, requires compiler support, clang only at this time.
MSYS2 (GCC)
A complete runtime environment for GCC & LLVM for 32-bit (x86), 64-bit (x64), and ARM64 Windows

implementation of the GNU toolchain for Windows, 32-bit version; see also Mingw-w64

MinGW_installation_manager.webp
MinGW GCC For M68K
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 … Wikipedia
Ratings
4.3 / 5.0
SourceForge
221 votes
Factsheet
Original author Colin Peters
Developer MinGW Project
Initial release July 1, 1998; 27 years ago (1998-07-01)
Factsheet
Original author Colin Peters
Developer MinGW Project
Initial release July 1, 1998; 27 years ago (1998-07-01)
🌐
SourceForge
sourceforge.net › projects › mingw
MinGW - Minimalist GNU for Windows download | SourceForge.net
4 weeks ago - MinGW: A native Windows port of the GNU Compiler Collection (GCC), with freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality.
Rating: 4.3 ​ - ​ 221 votes
Discussions

What is MinGW, why there is a lot of compilers and why this is so confusing?
MinGW is an effort to port GNU tools, including particularly the gcc compiler suite, to run natively in Windows. There's a lot of history but to get the point, when you see a download like x86_64-13.2.0-release-win32-seh-msvcrt-rt_v11-rev1.7z … the various parts of the name indicate: x86_64 = 64 bit. That's what you want. In contrast, just x86 or i686 means 32-bit. 13.3.0 = version number. I believe that as of this writing that's the latest 'n greatest. release, well who knows. Might mean that this is an official release. Or might be in contrast to a "debug" version. win32 = it's for Windows, yay! Including 64-bit Windows. The super-misleading "32" is Microsoft's fault. seh = uses Windows' Structured Exception Handling to implement C++ try-throw-catch. msvcrt = the runtime library, here Microsoft's msvcrt.dll which is bundled with Windows. An alternative is the newer ucrt.dll, where the "u" stands for "universal". I know the former works well, not sure about the latter. As others have mentioned you can/should install the Visual Studio IDE in order to Get "Hello, world!" up and running. Debug things (its got a nice debugger). However, you should better also work in the command line in order to learn about compiling and linking and resources and input redirection and pipes and environment variables and current directory and much more. You can use the Visual C++ compiler from the command line via command cl, I believe at once backwards short for Lattice C, which was the compiler MS once bought and based their compiler on. After installing VS you can find "x64 Native Tools Command Prompt for VS 2022" in the Start menu's apps listing. You can use that to invoke cl, but do consider first installing Windows Terminal and making that your default console environment. Personally I instead use a little batch file to set up the requisite environment variables for Visual C++, like this: @echo off call "%VS-ROOT%\VC\Auxiliary\Build\vcvars64.bat" %* set CL=^ /nologo /utf-8 /EHsc /GR /permissive- /std:c++17 /Zc:__cplusplus /Zc:externC- /W4 /wd4459 ^ /D _CRT_SECURE_NO_WARNINGS=1 /D _STL_SECURE_NO_WARNINGS=1 The corresponding batch file for MinGW g++ is simpler: @echo off set op=%path% set path=c:\root\installed\MinGW\Nuwen 11-2-0\bin;%op% It's generally a good idea to use two different compilers, such as Visual C++ and g++, mainly because when one compiler's diagnostics get completely ungrokable, the other compiler can give at least a hint about what the problem is. Another reason is that compilers differ in their standards-conformance. When some code compiles cleanly with at least two compilers that have been told to be as conforming as possible, you can have better confidence that the code is valid standard C++. More on reddit.com
🌐 r/cpp_questions
76
70
November 6, 2023
c++ - Installing the latest version of mingw-w64 on Windows - Stack Overflow
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. More on stackoverflow.com
🌐 stackoverflow.com
Mingw: Replacing fork/vfork function (compiling linux code on windows)
Replace fork(2)+exec(3) with a call to CreateProcess . Any configuration occurring between fork(2) and exec(3) such as setting up file descriptors will need to become arguments to CreateProcess. If there's no exec(3) and it's just using fork(2) to spawn worker clones… well, then you're kind of stuck. That's difficult to replace with spawn-based APIs. More on reddit.com
🌐 r/C_Programming
1
1
December 8, 2020
Is GNU GCC C compiler the same as MinGW GCC C compiler?
Yes. MinGW was originally known as mingw32, "Minimalist GNU for W32". The project provides Windows builds of a bunch of GNU software, including GCC. More on reddit.com
🌐 r/C_Programming
6
6
April 30, 2021
🌐
Visual Studio Code
code.visualstudio.com › docs › cpp › config-mingw
Using GCC with MinGW
November 3, 2021 - Get the latest version of MinGW-w64 via MSYS2, which provides up-to-date native builds of GCC, MinGW-w64, and other helpful C++ tools and libraries. This will provide you with the necessary tools to compile your code, debug it, and configure it to work with IntelliSense.
🌐
Microsoft Learn
learn.microsoft.com › en-us › vcpkg › users › platforms › mingw
Mingw-w64 | Microsoft Learn
vcpkg includes x64, x86, arm64 and arm community triplets for Mingw-w64. They don't depend on Visual Studio and can be used natively on Windows as well as for cross-compiling on other operating systems.
🌐
mingw-w64
mingw-w64.org › downloads
Pre-built Toolchains - mingw-w64
The toolchain includes pthreads, C++11 threads, and OpenMP. All included runtime components are static. ... Standalone mingw-w64+GCC builds for Windows, built from scratch (including all dependencies) natively on Windows for Windows. Downloads are archive files (.zip or .7z). No installation is required, just extract the archive and start using the programs in mingw32\bin or mingw64\bin. This allows for a relocatable compiler suite and allows having multiple versions on the same system.
🌐
GitHub
github.com › niXman › mingw-builds-binaries › releases
Releases · niXman/mingw-builds-binaries
This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired. GPG key ID: 4AEE18F83AFDEB23 · Expired · Verified · Learn about vigilant mode. Compare · Filter · Loading · There was an error while loading. Please reload this page. View all tags · Release of 13.2.0-rt_v11-rev0 · Release for GCC-13.2.0 with MinGW-W64 runtime version 11 ·
Author   niXman
Find elsewhere
🌐
Reddit
reddit.com › r/cpp_questions › what is mingw, why there is a lot of compilers and why this is so confusing?
r/cpp_questions on Reddit: What is MinGW, why there is a lot of compilers and why this is so confusing?
November 6, 2023 -

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.

Top answer
1 of 17
42
MinGW is an effort to port GNU tools, including particularly the gcc compiler suite, to run natively in Windows. There's a lot of history but to get the point, when you see a download like x86_64-13.2.0-release-win32-seh-msvcrt-rt_v11-rev1.7z … the various parts of the name indicate: x86_64 = 64 bit. That's what you want. In contrast, just x86 or i686 means 32-bit. 13.3.0 = version number. I believe that as of this writing that's the latest 'n greatest. release, well who knows. Might mean that this is an official release. Or might be in contrast to a "debug" version. win32 = it's for Windows, yay! Including 64-bit Windows. The super-misleading "32" is Microsoft's fault. seh = uses Windows' Structured Exception Handling to implement C++ try-throw-catch. msvcrt = the runtime library, here Microsoft's msvcrt.dll which is bundled with Windows. An alternative is the newer ucrt.dll, where the "u" stands for "universal". I know the former works well, not sure about the latter. As others have mentioned you can/should install the Visual Studio IDE in order to Get "Hello, world!" up and running. Debug things (its got a nice debugger). However, you should better also work in the command line in order to learn about compiling and linking and resources and input redirection and pipes and environment variables and current directory and much more. You can use the Visual C++ compiler from the command line via command cl, I believe at once backwards short for Lattice C, which was the compiler MS once bought and based their compiler on. After installing VS you can find "x64 Native Tools Command Prompt for VS 2022" in the Start menu's apps listing. You can use that to invoke cl, but do consider first installing Windows Terminal and making that your default console environment. Personally I instead use a little batch file to set up the requisite environment variables for Visual C++, like this: @echo off call "%VS-ROOT%\VC\Auxiliary\Build\vcvars64.bat" %* set CL=^ /nologo /utf-8 /EHsc /GR /permissive- /std:c++17 /Zc:__cplusplus /Zc:externC- /W4 /wd4459 ^ /D _CRT_SECURE_NO_WARNINGS=1 /D _STL_SECURE_NO_WARNINGS=1 The corresponding batch file for MinGW g++ is simpler: @echo off set op=%path% set path=c:\root\installed\MinGW\Nuwen 11-2-0\bin;%op% It's generally a good idea to use two different compilers, such as Visual C++ and g++, mainly because when one compiler's diagnostics get completely ungrokable, the other compiler can give at least a hint about what the problem is. Another reason is that compilers differ in their standards-conformance. When some code compiles cleanly with at least two compilers that have been told to be as conforming as possible, you can have better confidence that the code is valid standard C++.
2 of 17
17
Someone reset the counter. Forget MinGW. Download the free Visual Studio Community Edition (not Code).
🌐
GeeksforGeeks
geeksforgeeks.org › c++ › installing-mingw-tools-for-c-c-and-changing-environment-variable
Installing MinGW Tools for C/C++ and Changing Environment Variable - GeeksforGeeks
July 23, 2025 - MinGW is a native C/C++ compiler(GCC) which have free distributable import libraries and header files for building native Windows applications.
🌐
SourceForge
sourceforge.net › projects › mingw-w64
MinGW-w64 - for 32 and 64 bit Windows download | SourceForge.net
1 week ago - Download MinGW-w64 - for 32 and 64 bit Windows for free. A complete runtime environment for gcc. The mingw-w64 project is a complete runtime environment for gcc to support binaries native to Windows 64-bit and 32-bit operating systems.
🌐
Chocolatey
community.chocolatey.org › packages › mingw
Chocolatey Software | MinGW-w64 15.2.0
Mingw-w64 is an advancement of the original mingw.org project, created to support the GCC compiler on Windows systems. It has forked it in 2007 in order to provide support for 64 bits and new APIs.
🌐
Wikipedia
en.wikipedia.org › wiki › MinGW
MinGW - Wikipedia
August 9, 2025 - In addition, a component of MinGW ... a selection of POSIX tools sufficient to enable autoconf scripts to run, but it does not provide a C compiler or a case-sensitive file system....
🌐
Rose-Hulman Institute of Technology
rose-hulman.edu › Class › csse › resources › MinGW › installation.htm
How to Install the MinGW Tools for C/C++
Download this MinGW folder and run it. Your browser may warn that "This file is not commonly downloaded and may harm your computer" , but run it anyway. (In one dialog box, selecting 'additional options' allowed it to run. This installation will download various files from the web. Accept the default installation folder C:\MinGW.
🌐
UCI ICS
ics.uci.edu › ~pattis › common › handouts › mingweclipse › mingw.html
MinGW C++ Download and Installation Instructions
MinGW means Minimalist GNU for Windows: GNU is a source of open source programming tools (GNU stands for GNU is Not Unix). In this handout you will download the files needed by GNU C++; in the next you will download a version of Eclipse that is already set up to use MinGW.
🌐
Thegreycorner
thegreycorner.com › 2010 › 02 › 13 › installing-and-running-mingw-windows-c.html
Installing and Running the MinGW Windows C Compiler on Linux · The Grey Corner
Having a working Windows c compiler ... shellcode to aid in analysis or to compile Windows c based exploits so you can run them on your Linux box using wine. In this post I will briefly cover the steps required to install the MinGW C compiler on a Linux system....
🌐
MSYS2
msys2.org
MSYS2
Despite some of these central parts being based on Cygwin, the main focus of MSYS2 is to provide a build environment for native Windows software and the Cygwin-using parts are kept at a minimum. MSYS2 provides up-to-date native builds for GCC, mingw-w64, CPython, CMake, Meson, OpenSSL, FFmpeg, Rust, Ruby, just to name a few.
🌐
MathWorks
mathworks.com › matlabcentral › fileexchange › 52848-matlab-support-for-mingw-w64-c-c-fortran-compiler
MATLAB Support for MinGW-w64 C/C++/Fortran Compiler - File Exchange - MATLAB Central
October 15, 2025 - It includes a GCC compiler and related tools for compiling C/C++/Fortran applications for Windows. C/C++/Fortran applications compiled with MinGW-w64 GCC can be called from MATLAB using MEX (see table for release limitations on Fortran support).
🌐
Nuwen
nuwen.net › mingw.html
MinGW Distro - nuwen.net
Essentials: The components of MinGW itself. They are required in order to run GCC. Libraries: Useful C and C++ libraries. Utilities: Programs used by programmers. ... I recommend that anyone who is learning Standard C++ and who uses Windows for a primary development environment should use two compilers: the most modern version of Microsoft Visual C++ and the most modern version of GCC, the GNU Compiler Collection.
🌐
WinLibs
winlibs.com
WinLibs - GCC+MinGW-w64 compiler for Windows
GCC (GNU Compiler Collection) is a free and open source compiler for C and C++ (and other languages like Objective-C, Fortran, D). MinGW-w64 is a free and open source C library for targetting Windows 32-bit and 64-bit platforms. The combination of these results in a free C/C++ compiler for Windows.
🌐
MathWorks
mathworks.com › matlab › external language interfaces › c with matlab › write c functions callable from matlab (mex files)
MinGW-w64 Compiler - MATLAB & Simulink
You can use the MinGW-w64 compiler to build MEX files, a MATLAB® interface to a C++ library, and standalone C/C++ or Fortran MATLAB engine and MAT-file applications.