MinGW vs MinGW-w64: which GCC for Windows should you use?
Both MinGW and MinGW-w64 let the GNU Compiler Collection build native Windows programs without a Unix compatibility layer. The names are confusingly similar, but for new projects the choice is usually clear.
The two contenders
-
Open Source
The original Minimalist GNU for Windows: GCC and tools for 32-bit Windows, installed with the mingw-get package manager.
-
Open Source
The fork that added 64-bit support and became the foundation of most modern GCC toolchains for Windows.
At a glance
| MinGW | MinGW-w64 | |
|---|---|---|
| Target | 32-bit Windows | 32-bit and 64-bit Windows |
| Status | Legacy; no longer actively developed | Actively maintained |
| What you download here | The mingw-get installer | Source release of headers, CRT and libraries |
| Typical use today | Old tutorials and legacy projects | Modern C and C++ development and cross-compiling |
Why MinGW-w64 is the usual choice
Almost every current Windows PC runs a 64-bit system, and MinGW-w64 produces native 64-bit programs as well as 32-bit ones. Its headers cover far more of the modern Windows API, and it is maintained, so it keeps up with new GCC releases. It is also used to cross-compile Windows programs from Linux and macOS.
Note that the MinGW-w64 project mainly publishes source code. Most people install a ready-built toolchain based on it, from their package manager or from a distribution such as MSYS2, or use one bundled with an IDE.
When the original MinGW still makes sense
Original MinGW remains useful if you are following an older course, maintaining a legacy 32-bit project or using an IDE that expects it, such as the classic Bloodshed Dev-C++. For anything new, prefer MinGW-w64.
Setting up a GCC toolchain on Windows
- Install a MinGW-w64 based toolchain into a folder without spaces, for example C:\mingw64.
- Add its bin folder (for example C:\mingw64\bin) to the Path variable under System Properties > Environment Variables.
- Open a new terminal and run
gcc --versionandg++ --versionto confirm Windows finds the compiler. - Compile a test program with
g++ hello.cpp -o hello.exeand run it.
If you keep both MinGW and MinGW-w64 on one PC, only one should be on the Path at a time; otherwise the first gcc Windows finds wins, which can lead to confusing errors when headers and libraries do not match.
Our verdict
Use MinGW-w64 for new work. Keep MinGW for legacy setups only. To pair a compiler with an editor, see our guide to free C and C++ IDEs and compilers, which includes Dev-C++.
Frequently asked questions
Is MinGW-w64 only for 64-bit Windows?
No. Despite the name, MinGW-w64 can build both 32-bit and 64-bit Windows programs.
How do I check which GCC I have installed?
Open a terminal and run gcc -v. The "Target" line shows whether it builds for 32-bit (i686) or 64-bit (x86_64) Windows.
Do programs built with MinGW need extra DLLs?
Simple programs link to Windows’ own runtime. Programs using C++ features or threads may need runtime DLLs from the toolchain unless you link them statically.
Can I use MinGW-w64 with Dev-C++?
Yes. The Orwell edition of Dev-C++ can be pointed at a MinGW-w64 based compiler in its compiler options.
More comparisons
XAMPP vs WampServer · Joplin vs Obsidian · Obsidian vs Trilium Notes · Joplin vs QOwnNotes · v2rayN vs Hiddify · antiX vs MX Linux · Xournal vs Xournal++