gcc or g++ not recognised solution using MinGW64 Files.
Error: ‘gcc’ is not recognized as an internal or external command. Step by Step Solution:
1. Download MinGW64 Compiler Files from :
https://drive.google.com/file/d/1fYHziV6Xq4DwK6SqGSKE-TKXg7USoHwP/view?usp=sharing
(All files are downloaded from DevC++ )
or
If you have Dev-C++ already installed you can go the Location C:\Program Files (x86)\Dev-Cpp\MinGW64
Download Dev-C++ from sourceforge.net
2. Inside the MinGW64 folder copy the address from search bar
Like in my System it is, C:\Program Files (x86)\Dev-Cpp\MinGW64\bin
3. Open the Environment Variables Options in Windows
Simply paste the above path in new PATH VARIABLE.
4. Restart Your CMD , Now You are ready to run gcc and g++ commands.
Now this should give the following error, its showing that it is working.
D:\>gcc
gcc: fatal error: no input files
compilation terminated.
5. Test by compiling a cpp file
CPP FILE SHOULD BE PRESENT IN THIS LOCATION
D:\>g++ -o program file.cpp
then to run program.exe
D:\>program
Now this will not give any error.
Original Article at: https://btechcse762.blogspot.com/2020/10/gcc-or-g-not-recognised-solution-using.html