Comparison

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

  1. MinGW - Minimalist GNU for Windows

    by Wu Yongwei and contributors · Windows, macOS, MinGW/MSYS2

    Open Source

    The original Minimalist GNU for Windows: GCC and tools for 32-bit Windows, installed with the mingw-get package manager.

  2. MinGW-w64 - for 32 and 64 bit Windows

    by GhostlyDeath and contributors · Windows, Linux, MinGW/MSYS2, Server Operating Systems

    Open Source

    The fork that added 64-bit support and became the foundation of most modern GCC toolchains for Windows.

At a glance

MinGWMinGW-w64
Target32-bit Windows32-bit and 64-bit Windows
StatusLegacy; no longer actively developedActively maintained
What you download hereThe mingw-get installerSource release of headers, CRT and libraries
Typical use todayOld tutorials and legacy projectsModern 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

  1. Install a MinGW-w64 based toolchain into a folder without spaces, for example C:\mingw64.
  2. Add its bin folder (for example C:\mingw64\bin) to the Path variable under System Properties > Environment Variables.
  3. Open a new terminal and run gcc --version and g++ --version to confirm Windows finds the compiler.
  4. Compile a test program with g++ hello.cpp -o hello.exe and 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

← All comparisons