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
๐ŸŒ
PhoenixNAP
phoenixnap.com โ€บ home โ€บ kb โ€บ devops and development โ€บ how to install gcc on windows
How to Install GCC on Windows
September 23, 2024 - 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...
๐ŸŒ
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.

๐ŸŒ
GitHub
gist.github.com โ€บ jacksonrakena โ€บ fd83c781c9175375b8326024ab2964ba
Installing MinGW (GCC C++) and Geany, for ENGR 101 at VUW ยท GitHub
This guide details how to install MinGW, the GNU C/C++ compiler, on a Windows or macOS operating system (clang). If you have a Mac, you'll probably need to run xcode-select -install in a Terminal window, and wait for it to finish, and then you should be done. (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.
๐ŸŒ
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 over to the official Mingw-w64 website (https://mingw-w64.org/doku.php) and download the Mingw-w64 installer. Mingw-w64 is a development environment for Windows, including GCC, which allows you to compile and ...
๐ŸŒ
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
Learn how to install GCC and g++ compilers on Windows 11 with this step-by-step guide. Ideal for developers, this tutorial covers everything from downloading MinGW to setting up environment variables, enabling seamless C/C++ programming on your PC
๐ŸŒ
GNU
gcc.gnu.org โ€บ install โ€บ binaries.html
Installing GCC: Binaries - GNU Project
We are often asked about pre-compiled versions of GCC. While we cannot provide these for all platforms, below youโ€™ll find links to binaries for various platforms where creating them by yourself is not easy due to various reasons. Please note that we did not create these binaries, nor do we support them. If you have any problems installing ...
๐ŸŒ
YouTube
youtube.com โ€บ watch
How to Install GCC Compiler Tools in Windows 11 (C/C++)
Enjoy the videos and music you love, upload original content, and share it all with friends, family, and the world on YouTube.
๐ŸŒ
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.
Find elsewhere
๐ŸŒ
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 - As I am using a 64 bit operating system, I have opened the terminal for 64 bit. Apply the command pacman -S mingw-w64-x86_64-gcc to install the compilers.
๐ŸŒ
Host IT Smart
hostitsmart.com โ€บ manage โ€บ knowledgebase โ€บ 435 โ€บ install-gcc-compiler-on-windows.html
How to Install GCC Compiler on Windows?
May 21, 2025 - Learn step-by-step how to install the GCC compiler on Windows. Follow this guide to effortlessly set up GCC for C and C++ programming on your Windows system.
๐ŸŒ
Quora
quora.com โ€บ How-do-I-install-C-on-Windows-11-1
How to install C on Windows 11 - Quora
Answer: There are several ways to go depending on what you want to do * Microsoft provides a first-party C/C++ compiler and IDE in Visual Studio. The download is found here. * GCC is a popular C compiler in the Linux/UNIX world. It is available for Windows as part of Cygwin and MingW * WSL or...
๐ŸŒ
Solve Your Tech
solveyourtech.com โ€บ home โ€บ programs โ€บ how to install gcc in windows 11: a comprehensive guide
How to Install GCC in Windows 11: A Comprehensive Guide - Solve Your Tech
January 7, 2025 - Ensure all package selections are correct and try reinstalling. Check online forums for specific error messages. Download MinGW. Launch the installer. Select GCC packages. Apply changes.
๐ŸŒ
GNU
gcc.gnu.org โ€บ install
Installing GCC - GNU Project
The latest version of this document is always available at https://gcc.gnu.org/install/. It refers to the current development sources, instructions for specific released versions are included with the sources.
๐ŸŒ
GitHub
gist.github.com โ€บ alandsilva26 โ€บ 53cd2fecf253554c2f671766d3df5d66
Instructions for installing GCC Compiler on Windows ยท GitHub
Locate your program I will be giving this example considering .c program cd into your desired directory where file is locate or type cmd in the adress bar then type command gcc -o name name.c eg. gcc -o helloworld helloworld.c The name after ...
๐ŸŒ
UltaHost
ultahost.com โ€บ knowledge-base โ€บ install-gcc-on-windows
How to Install GCC on Windows | Ultahost Knowledge Base
July 26, 2025 - Step-by-step guide to install GCC on Windows using MinGW-w64, set up the PATH, and verify the compiler works.
๐ŸŒ
Support Your Tech
supportyourtech.com โ€บ home โ€บ how to install gcc on windows 11: a step-by-step guide for beginners
How to Install GCC on Windows 11: A Step-by-Step Guide for Beginners
May 16, 2024 - Yes, another popular option is Cygwin, which provides a large collection of GNU and Open Source tools that provide functionality similar to a Linux distribution on Windows. Download MinGW. Install MinGW. Select packages. Apply changes. Set environment variables. Verify installation. Installing GCC on Windows 11 might seem a bit daunting at first, but breaking it down into these easy steps makes it manageable.
๐ŸŒ
Quora
quora.com โ€บ How-do-you-install-GCC-on-Windows
How to install GCC on Windows - Quora
Step 1: Search MinGW C Compiler on the Web To download the MinGW compiler, go to your favorite browser and search MinGW C Compiler or click on the sourceforge.net link. Step 2: Download MinGW.
๐ŸŒ
LinkedIn
linkedin.com โ€บ pulse โ€บ installing-gcc-compiler-windows-run-c-program-gitbash-david-michael
Installing GCC Compiler in Windows To Run C Program on Gitbash and Setting the PATH Variable
February 5, 2023 - GCC, or GNU Compiler Collection, is a popular open-source compiler used for developing and executing various programming languages, including C, C++, Fortran, Ada, and more. In this article, we will guide you through the process of installing GCC on a Windows operating system and setting the PATH va