Although an old question, none of the answers here helped me. The only route I found to get to my destination is by typing in the following line in my command prompt:

set Path=C:\MinGW\bin;%PATH%

After that, simply type in gcc -v.

Hope this helps anyone with the problem I had!

Answer from user7943 on Stack Overflow
🌐
Reddit
reddit.com › r/c_programming › i downloaded and installed mingw. typing gcc in the windows command line prints: gcc is not recognized as an internal or external command
I downloaded and installed MinGW. Typing gcc in the Windows command line prints: gcc is not recognized as an internal or external command : r/C_Programming
September 14, 2024 - Navigate to the directory where gcc is located (either with cd, or by navigating in explorer.exe and typing cmd in the path bar) and try out whether gcc works there, if it does your PATH variable is set wrong but at least your compiler works.
🌐
CodeWithHarry
codewithharry.com › blogpost › solved-gcc-not-recognized-error-windows
[Solved] gcc: The term 'gcc' is not recognized as the name of a cmdlet, function... | Blog | CodeWithHarry
Facing the 'gcc is not recognized' error in your Windows system? This comprehensive guide provides step-by-step solutions to resolve the issue, including installing MinGW and setting up environment variables. Follow these simple steps to ensure a seamless coding experience with gcc.
🌐
Bobby Hadz
bobbyhadz.com › blog › gcc-is-not-recognized-as-an-internal-or-external-command
gcc is not recognized as an internal or external command | bobbyhadz
April 4, 2024 - A step-by-step illustrated guide on how to solve the error "gcc is not recognized as an internal or external command".
🌐
GitHub
gist.github.com › alandsilva26 › 53cd2fecf253554c2f671766d3df5d66
Instructions for installing GCC Compiler on Windows · GitHub
April 26, 2026 - 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 -o is the name given to exe file that is generated Correct errors if any and run the above command again when done If no errors are generated Type name that is the name of your .exe the program will have run · You could also download CODE::BLOCKS IDE which comes with the GCC compiler Download the binary release from here Download the one that says mingw-setup.exe Make sure that you dont have gcc previously installed in your computer Follow the instructions You will have to set the path manually as we did previously The bin lies in C:\Program Files(x86)|CodeBlocks\MinGW\bin
🌐
Windows Command Line
windows-commandline.com › gcc-not-recognized-internal-external-command
GCC is not recognized as internal or external command
May 21, 2016 - ... Same problem. Have the path added to system level, user level and mingw copied to a directory path with no spaces in it (programfiles 86 has a space and sometimes spaces in paths are a problem). ... This fixed it right up make sure not to mix up user and enviornment variables.
🌐
Edaboard
edaboard.com › eda software › software problems, hints and reviews
gcc is not recognized as an internal or external command | Forum for Electronics
June 16, 2018 - Click to expand... I observed one thing, if i restart the system and after that I type Command :gcc -o test test.c it give the error. gcc is not recognized as an internal or external command.
🌐
YouTube
youtube.com › watch
[Solved] gcc is not recognized as an internal or external command operable program or batch file - YouTube
gcc is not recognized as an internal or external command operable program or batch file and the term 'gcc' is not recognized as the name of a cmdlet function...
Published   January 19, 2024
Find elsewhere
🌐
YouTube
youtube.com › watch
How to Fix "GCC is not recognized as an internal or external command" (2026) - YouTube
Are you getting the error “gcc is not recognized as an internal or external command” on Windows? In this tutorial, I’ll show you how to fix this issue step-b...
Published   March 10, 2026
🌐
YouTube
youtube.com › the code city
Fix "GCC not Recognized as Internal or External Command" in VSCode/Terminal (2023) - YouTube
In this video, I'll show you how you can fix the "gcc not recognized as internal or external command" in vscode in your windows machine. This can be because ...
Published   December 4, 2023
Views   1K
🌐
Empower Youth
empoweryouth.com › learning › video › solved-gcc-is-not-recognized-as-an-internal-or-external-command-operable-program-or-batch-file
[Solved] gcc is not recognized as an internal or external command operable program or batch file | Empower Youth
gcc is not recognized as an internal or external command operable program or batch file and the term 'gcc' is not recognized as the name of a cmdlet function script file or operable program are few common error people using gnu gcc compiler ...
🌐
YouTube
youtube.com › coders arcade
Solving the "gcc is not recognized as an internal or external command" Error. - YouTube
Solving the "gcc is not recognized as an internal or external command" Error..In this video we have shown you how you can solve the "gcc is not recognized as...
Published   July 17, 2021
Views   27K
Top answer
1 of 4
5

Hey,,, It will work for you I believe

Blockquote

  1. First: open the link: https://www.msys2.org/
  2. Go to the installation and download the installer .. install the exe file.
  3. search mingw in windows search(windows start)
  4. there is an app named--> MSYS2 MinGW {64/32}-bit
  5. run it as administrator
  6. Found command shell ---> type: pacman -Syu
  7. Will ask you for some installation click on Y
  8. Then again go to the same app MSYS2 MinGW {64/32}-bit and run as admin
  9. and write--> pacman -Ss gcc (in shell that opend after click)
  10. after clicking there will be bunch of things and now you have to care about your windows arch.. if it is 64 bit then write---> pacman -S mingw-w64-x86_64-gcc (and if its 32 you will find something like that where 64 will replaced by 32 in bunch of commands that are showing in your shell)
  11. after executing this command gcc will be installed in your system to check write: gcc --version || g++ --version
  12. After that to install the debugger write pacman -S mingw-w64-x86_64-gdb
  13. to check write: gdb --version

**Every thing got installed in your system now find the mingW file or mysys2 file on C drive(whereever you r mingW file got saved) go the the minGW 64 || 32 accroding to your operating system there is a bin folder click on that and copy the path inside the bin folder and save it in environment variables path **

Blockquote

Enjoy vs code

2 of 4
4

Works perfect in Visual Code. You need the following:

  • C/C++ extension in Visual Code.
  • msys64 installed in C:\
  • Add path to msys64 bin folder in environment variable

Instructions:

https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools

Important the msys64 path doesn't contain spaces so don't install it in Program Files.

You can search "Edit system environment variables" from the windows button, press button Environment Variables, and then add it as a System variable "Path". For me its located in

CopyC:\msys64\mingw64\bin
🌐
YouTube
youtube.com › watch
GCC/G++ is not recognized as an internal or external command, operable program or batch file - YouTube
How to fix: gcc/g++ is not recognized as an internal or external command, operable program or batch file. How to fix: the term 'gcc'/'g++' is not recognized ...
Published   November 8, 2021
🌐
GitHub
github.com › Nuitka › Nuitka › issues › 411
Windows: Using windres gives "gcc is not recognized as an internal or external command" · Issue #411 · Nuitka/Nuitka
May 31, 2019 - Followed and verified all tool installation well, https://github.com/Nuitka/Nuitka#tutorial-setup-and-build-on-windows but got gcc is not recognized as an internal or external command when python -m nuitka --standalone --mingw64 hello.py...
Author   Nuitka