Top Categories
[Solved] gcc is not recognized as an internal or external command operable program or batch file
- Category: Information Technology
- Sub Category: Web Development
2606 Views
No Likes
No Dislikes
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 encounter while using C compiler to compile their c files.
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 encounter while using C compiler to compile their c files. In this video I will not only solve this issue for you but explain you the reason for the same and how to avoid it in the future! ►Click here to subscribe - //www.youtube.com/channel/UCeVMnSShP_Iviwkknt83cww Best Hindi Videos For Learning Programming: ►Learn Python In One Video - //www.youtube.com/watch?v=qHJjMvHLJdg ►Learn JavaScript in One Video - //www.youtube.com/watch?v=onbBV0uFVpo ►Learn PHP In One Video - //www.youtube.com/watch?v=xW7ro3lwaCI ►Machine Learning Using Python - //www.youtube.com/playlist?list=PLu0W_9lII9ai6fAMHp-acBmJONT7Y4BSG ►Creating & Hosting A Website (Tech Blog) Using Python - //www.youtube.com/playlist?list=PLu0W_9lII9agAiWp6Y41ueUKx1VcTRxmf ►Advanced Python Tutorials - //www.youtube.com/playlist?list=PLu0W_9lII9aiJWQ7VhY712fuimEpQZYp4 ►Object Oriented Programming In Python - //www.youtube.com/playlist?list=PLu0W_9lII9ahfRrhFcoB-4lpp9YaBmdCP ►Python Data Science and Big Data Tutorials - //www.youtube.com/playlist?list=PLu0W_9lII9agK8pojo23OHiNz3Jm6VQCH Follow Me On Social Media ►Website (created using Flask) - //www.codewithharry.com ►Facebook - //www.facebook.com/CodeWithHarry ►Instagram (Guaranteed Replies :)) - //www.instagram.com/haris_magical/ ►Personal Facebook A/c - //www.facebook.com/geekyharis Twitter - //twitter.com/Haris_Is_Here
You Might Be Interested In
Top Videos
0
I'm trying to run a C program in sublime text and i keep getting the same error. Please help
c
12/17/2021 3:11:14 PM
Priyanka Singh
3 Answers
New Answer
Sort by:
+1
Pls inform the operating system
Emerson Prado
0
first download mimgw compiler then after downloading open it then go on bin copy path then You need to set environment variable path . Aftet that open cmd and check if gcc is working or not
Shira
on May 21, 2016
If you have installed MinGW tools on your system and are trying to run gcc from command prompt, you might get this error – 'gcc' is not recognized as an internal or external command. This post explains how we can fix this problem once for all.
- The first step is to check what all you have in your PATH environment variable. Run set path and verify
this. c:\>set path
Path=C:\Program Files (x86)\Windows Resource Kits\Tools\;C:\WINDOWS\system32;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;c:\Program Files\Java\jdk1.7.0_79\bin;C:\Program Files (x8
6)\Skype\Phone\;C:\Program Files (x86)\Quarantine\;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Windows Resource Kits\Tools\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\
Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;c:\Program F
iles\Java\jdk1.7.0_79\bin;C:\Program Files (x86)\Skype\Phone\;C:\Program Files (x86)\Quarantine\;c:\Program Files (x86)\Mozilla Firefox"
If you have such a long path like in my case, use findstr to quickly check if it has mingw anywhere in the string.
c:\>set path | findstr /I /C:"mingw" c:\> - Now this tells me that I have not added MinGW installation folder yet to my path. I would need to add it then. The next step explains how to do this.
- The path values for system or any user can be edited in GUI. There are multiple ways to open the window where you can edit it. What I usually do is press the windows button and start typing
‘environment..’ which searches all files/programs with this name. You would see couple of links in the search results as shown below.
- Select ‘Edit system environment variables’. Both of them take you to the same window, but the system one allows you to edit system variables.
- In system variables, find the ‘PATH’ environment variable and then edit it to add MinGW path. You need to add ‘;’ at the end of the existing value and then enter MinGW
path.
After doing the above steps, open a new command prompt and run gcc to compile a C program.
c:\>type helloWindows.c #include int main() { printf("Hello Windows"); } c:> c:\>gcc -o HelloWindows.exe helloWindows.c c:\> HelloWindows.exe Hello WindowsThat completes the setup. Before I end the post, reiterating couple of important points.
1. Add path to system environment variable, not user environment variable.
2. Open a new command window after setting PATH.
Let us know if this post helped you to fix the problem. If you still have issues, please add to the comments the error you are getting into. We would do our best to reply and help you fix the problem.