DEV Community

Cover image for How to Install the New Version of GCC MinGW on Windows
Marcos Oliveira
Marcos Oliveira

Posted on

1

How to Install the New Version of GCC MinGW on Windows

We previously published a post about installing GCC MinGW on Windows, but it has become outdated — it was the old version: 8.1.0.

In this short article, we’ll see how to update or install it (if you haven’t already) the easy way.


Installation

If you installed the version from the previous article

First, remove (or rename) the folder:

Open PowerShell with administrator privileges.

To rename:

Rename-Item -Path "C:\mingw64" -NewName "mingw64-old"
Enter fullscreen mode Exit fullscreen mode

Or to remove the installation:

Remove-Item -Path "C:\mingw64" -Recurse -Force
Enter fullscreen mode Exit fullscreen mode

Now just download the compressed file from:

Or direct download:
https://sourceforge.net/projects/winlibs-mingw/files/latest/download

Extract the file

If extracting it didn’t create the mingw32 folder, it’s because it’s inside the folder:
winlibs-i686-mcf-dwarf-gcc-15.1.0-mingw-w64ucrt-12.0.0-r1/.

Move it to drive C:\:

Move-Item -Path "mingw32" -Destination "C:\"
Enter fullscreen mode Exit fullscreen mode

Rename it to mingw64:

Rename-Item -Path "C:\mingw32" -NewName "mingw64"
Enter fullscreen mode Exit fullscreen mode

Add to the PATH system variable

Do this only if this is your first installation. If you’re updating from the previous article’s procedure, you don’t need to.

Open the terminal with administrator privileges and run the command below:

[Environment]::SetEnvironmentVariable("Path", $env:Path + ";C:\mingw64", "Machine")
Enter fullscreen mode Exit fullscreen mode

Now check the version by running:

If this is your first installation, close and reopen the terminal!

g++ --version
Enter fullscreen mode Exit fullscreen mode

15.1.0

The full output will be:

g++.exe (MinGW-W64 i686-ucrt-mcf-dwarf, built by Brecht Sanders, r1) 15.1.0
Copyright (C) 2025 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Enter fullscreen mode Exit fullscreen mode

This version is available at https://winlibs.com, which links to the same SourceForge page, but there are other versions there for different setups.

If you want to use the make command, remember to rename it from C:\mingw64\bin\mingw32-make to C:\mingw64\bin\make.

Rename-Item -Path "C:\mingw64\bin\mingw32-make" -NewName "make"
Enter fullscreen mode Exit fullscreen mode

See also:

AWS GenAI LIVE image

How is generative AI increasing efficiency?

Join AWS GenAI LIVE! to find out how gen AI is reshaping productivity, streamlining processes, and driving innovation.

Learn more

Top comments (0)

Tiger Data image

🐯 🚀 Timescale is now TigerData: Building the Modern PostgreSQL for the Analytical and Agentic Era

We’ve quietly evolved from a time-series database into the modern PostgreSQL for today’s and tomorrow’s computing, built for performance, scale, and the agentic future.

So we’re changing our name: from Timescale to TigerData. Not to change who we are, but to reflect who we’ve become. TigerData is bold, fast, and built to power the next era of software.

Read more

👋 Kindness is contagious

Dive into this thoughtful piece, beloved in the supportive DEV Community. Coders of every background are invited to share and elevate our collective know-how.

A sincere "thank you" can brighten someone's day—leave your appreciation below!

On DEV, sharing knowledge smooths our journey and tightens our community bonds. Enjoyed this? A quick thank you to the author is hugely appreciated.

Okay