As a followup comment, did you add the bin path to your environment path? If so, you'll need to close and reopen VSCode and any other terminals, for that pathing to take effect. Answer from EdwinGraves on reddit.com
๐ŸŒ
Reddit
reddit.com โ€บ r/programminghelp โ€บ how to run gcc on windows 11? i installed it (correctly) based on the instructions on msys2 and visual studio's websites, but it doesn't execute code
r/programminghelp on Reddit: How to run GCC on Windows 11? I installed it (correctly) based on the instructions on MSYS2 and Visual Studio's websites, but it doesn't execute code
February 17, 2022 -

Not sure if this counts, since this is more about running code than writing it.

I have followed the instructions on these sites. I have also made sure to change "Path" in the environmental variables. https://code.visualstudio.com/docs/cpp/config-mingw https://www.mingw-w64.org/

The installation worked, but no matter what I try (running in command prompt, running in Visual Studio) I get something like: "'g++' is not recognized as an internal or external command, operable program or batch file." when I try to execute some code. Why is this?

EDIT 1: Visual Studio Code*, not Visual Studio.

EDIT 2: Seems to be working now! I'm the only user on my computer, but I had to change my system variables - not just the user variables - for it to work.

๐ŸŒ
SourceForge
sourceforge.net โ€บ projects โ€บ gcc-win64
gcc-win64 download | SourceForge.net
Download gcc-win64 for free. x64 build of GCC for Windows. x64 C/C++ compiler for Windows using (unofficial build): - gmp - mpfr - mpc - isl - cloog - mingw-w64 - gcc - seh You need at least core2 command set support to run this application. Note that every version with bundled gdb needs at ...
Discussions

c - how to update install GCC 11.2 on windows - Stack Overflow
I want to learn C. I have downloaded mingw from sourceforge.net but after installing it I realised that it installed version 6.3.0 of GCC. as I know the latest version of GCC is 11.2. Does anybody... More on stackoverflow.com
๐ŸŒ stackoverflow.com
c++ - C++11 compiler for windows - Stack Overflow
It should be easy to replace your current GCC with TDM GCC by overwriting files... ... Sign up to request clarification or add additional context in comments. ... Note that although these might seem nice, TDM does some nasty changes (remove command line options, change ABI) that make them incompatible with the vanilla (unpatched) upstream versions. 2011-11-01T12:48:01.617Z+00:00 ... Yes. Note I said "a good place" - that does not necessarily mean the only one. :) I cross-compile build my own Windows ... More on stackoverflow.com
๐ŸŒ stackoverflow.com
Windows 11 24H2 upgrade for GCC
Feature updates work fine for me in GCC High. I use Intune update rings. If you are having issues updating certain devices, check the windows 11 update readiness reports and make sure there arenโ€™t any safeguard holds enabled on the devices More on reddit.com
๐ŸŒ r/Intune
9
5
August 27, 2025
Replacing mingw gcc with newer gcc version (Windows 11)
You can use MSYS2. It also comes with package manager and repository that contains many prebuilt open source libraries. More on reddit.com
๐ŸŒ r/cpp_questions
30
3
November 4, 2023
๐ŸŒ
PhoenixNAP
phoenixnap.com โ€บ home โ€บ kb โ€บ devops and development โ€บ how to install gcc on windows
How to Install GCC on Windows
April 22, 2026 - This section outlines the steps for installing GCC using minGW-w64. Navigate to the GitHub minGW-w64 page and scroll down to the Assets section. From the list of files, select the one you want to use on your system: We use Windows 11 64-bit and will download the x86_64-14.2.0-release-posix...
๐ŸŒ
Visual Studio Code
code.visualstudio.com โ€บ docs โ€บ cpp โ€บ config-mingw
Using GCC with MinGW
November 3, 2021 - You can install the C/C++ extension by searching for 'C++' in the Extensions view (โ‡งโŒ˜X (Windows, Linux Ctrl+Shift+X)). 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.
๐ŸŒ
GitHub
gist.github.com โ€บ jacksonrakena โ€บ fd83c781c9175375b8326024ab2964ba
Installing MinGW (GCC C++) and Geany, for ENGR 101 at VUW ยท GitHub
(This will install Clang, which is GCC-compatible) If you have anything in C:\MinGW, delete it. Go to this website and click either MinGW C/C++ For Windows 11 32/64 bit (for Windows 11) or MinGW C/C++ For Windows 10 32/64 bit (for Windows 10) Do not download the Turbo compiler.
๐ŸŒ
CodeWithHarry
codewithharry.com โ€บ blogpost โ€บ how-to-install-gnu-gcc-compiler-on-windows
How to install gnu gcc compiler for C Language on Windows | Blog | CodeWithHarry
You've now successfully set up gcc on Windows 11, enabling you to create C/C++ applications seamlessly. These steps cover the entire process, from installing the gcc and g++ compilers to executing your programs in the command prompt. Should you encounter any inquiries or difficulties, feel free to reach out via the comments section.
๐ŸŒ
Opt Node
optnode.com โ€บ home โ€บ guides โ€บ how to install gcc on windows 11: a step-by-step guide
How to Install GCC on Windows 11: A Step-by-Step Guide - Opt Node
1 month ago - If youโ€™re eager to start coding in C or C++ on your Windows 11 machine, getting the GNU Compiler Collection (GCC) installed is an essential step. By following a few straightforward steps, you can have GCC up and running in no time.
Find elsewhere
๐ŸŒ
TechBloat
techbloat.com โ€บ home โ€บ how to install gcc in windows 11
How to install gcc in Windows 11 - TechBloat
May 16, 2026 - MinGW-w64: the Windows port that lets GCC produce native Windows programs. Windows 11 does not include GCC by default. You need to install a toolchain. The best choice for most users in 2026 is MSYS2 with MinGW-w64 GCC.
๐ŸŒ
Microsoft
microsoft.com โ€บ en-ph โ€บ download โ€บ details.aspx
Download Windows 365 Government - GCC Setup Tool for Windows 10/11 from Official Microsoft Download Center
July 18, 2024 - Download the GCCSetupTool.zip from the Download Center and place it on an accessible share or local folder
๐ŸŒ
GeekChamp
geekchamp.com โ€บ home โ€บ how to install gcc in windows 11 for beginners
How to Install GCC in Windows 11 for Beginners - GeekChamp
May 16, 2026 - GCC also includes g++, the C++ compiler. The command is similar, but you should use g++ instead of gcc for C++ programs. ... #include <iostream> int main() { std::cout << "Hello from C++ on Windows 11!" << std::endl; return 0; }
๐ŸŒ
freeCodeCamp
freecodecamp.org โ€บ news โ€บ how-to-install-c-and-cpp-compiler-on-windows
How to Install C and C++ Compilers on Windows
February 22, 2022 - The MinGW compiler is a well known and widely used software for installing GCC and G++ compilers for the C and C++ programming languages. But many devs face difficulties when installing the compiler, so I am going to show you all the steps to do so in this article with screenshots to help you get it done. I will be using Windows 11, but the same process is applicable for all other Windows operating systems unless you are using Windows XP (You need to change some steps in Windows XP).
๐ŸŒ
WinLibs
winlibs.com
WinLibs - GCC+MinGW-w64 compiler for Windows
WinLibs - MinGW-w64 personal build = GCC for Windows 32-bit and 64-bit - Coming soon: the largest collection of open source libraries ported to Windows using MinGW-w64 and MSYS2.
๐ŸŒ
mingw-w64
mingw-w64.org
mingw-w64
Everything needed for linking and running your code on Windows. Better-conforming and faster math support compared to VisualStudio's. ... Winpthreads, a pthreads library for C++11 threading support and simple integration with existing project.
๐ŸŒ
UMA Technology
umatechnology.org โ€บ home โ€บ how to install gcc on windows 11
How to install gcc on Windows 11 - UMA Technology
March 8, 2025 - This guide will walk you through everything you need to know about installing GCC on Windows 11, including methods, troubleshooting tips, and additional tools you might need.
๐ŸŒ
Medium
medium.com โ€บ @anazilthottunghal โ€บ a-guide-to-installing-gcc-on-windows-5cc95c2f38c4
A Guide to Installing GCC on Windows. | by Muhammed Anazil. T. A | Medium
December 5, 2023 - To begin the installation, head ... the Mingw-w64 installer. Mingw-w64 is a development environment for Windows, including GCC, which allows you to compile and run C and C++ programs....
๐ŸŒ
Reddit
reddit.com โ€บ r/intune โ€บ windows 11 24h2 upgrade for gcc
r/Intune on Reddit: Windows 11 24H2 upgrade for GCC
August 27, 2025 -

GCC doesnt allow feature updates. Believe me I have tried. So...

Does anyone know how I can upgrade Windows 11 to 24H2 with a Win32 app? I am using an ISO on a local machine and nothing even works to automate it.

setup.exe /auto upgrade /dynamicupdate disable /showoobe none /copylogs %SystemDrive%\UpgradeLogs

I have tried just about every combination, and it always displays a GUI. These are newer machines so it isnt anything to do with compat issues. I really dont want to use SCCM for this as we are trying to move all machines to intune. Touching each workstation to go to 24H2 is super annoying.

I also tried to just clean install from the Win32 app but that fails also. We have everything in OneDrive for our employees so it aint the end of the world but still annoying for custom apps. We have a few left that Intune hates.

๐ŸŒ
Reddit
reddit.com โ€บ r/cpp_questions โ€บ replacing mingw gcc with newer gcc version (windows 11)
r/cpp_questions on Reddit: Replacing mingw gcc with newer gcc version (Windows 11)
November 4, 2023 -

I currently have mingw installed and the newest available version of gcc (specifically g++) is 6.3.0. Is there a way I can get a newer version of gcc without having to manually replace files in the mingw directory or installing msys2 (or similar things like that)

Installing the newest version of g++ was so much easier on my linux laptop... And installing sfml was even easier. With the version I have on my windows computer, I can't even find a pre-compiled sfml version that works because "the compiler versions must match 100%"

edit: ideally, I want it to work without having to install a new ide that somehow has the compiler integrated in its source code