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.
First, remove (or rename) the folder:
Open PowerShell with administrator privileges.
To rename:
Rename-Item -Path "C:\mingw64" -NewName "mingw64-old"
Or to remove the installation:
Remove-Item -Path "C:\mingw64" -Recurse -Force
Or direct download: https://sourceforge.net/projects/winlibs-mingw/files/latest/download
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:\"
Rename it to mingw64
:
Rename-Item -Path "C:\mingw32" -NewName "mingw64"
PATH
system variableDo 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")
Now check the version by running:
If this is your first installation, close and reopen the terminal!
g++ --version
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.
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"