I have downloaded the GNU compiler using the instructions online. Whilst compiling, I keep on getting the following error:
sh: gcc: command not found
I have tried to search online, but I have has no luck. Does anybody know why this is occurring, or how to fix it?
P.S
I have the mingw folder saved in C:\mingw
and I am using the msys.bat
compiler as suggested online which is located in C:\mingw\msys\1.0
. The source .c file I am trying to compiler is located in D:\cfiles\task1
.
Thanks for your help in advance
Here is a link I found that solves this exact issue by modifying a line in the fstab.sample
file (in my case this is the name). To summarize, add mount
to the following line in fstab.sample
like this
c:/MinGW/ /mingw // Suggested* default line
mount c:/MinGW/ /mingw // Fixed the "gcc:command not found" error for me
*Suggested by MinGW/MSYS installation guide and seems to be present by default in the file these days. This is an alternative solution and modifying path variables works.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With