Reputation: 55
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
Upvotes: 5
Views: 15447
Reputation: 223
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.
Upvotes: 3
Reputation:
If you just want to use complex.h for its math functions forget about it and use math.h. Code :
#include <math.h> /* In c++ : #include <cmath> */
// Use math.h functions
Upvotes: -1
Reputation:
You know downloading a header file from internet isn't suitable because maybe that header file depends on other libraries and header files. So you should solve dependencies manually. Check this url and post errors.
Upvotes: 0
Reputation:
Right Click on Computer. Properties. Advanced Settings. Add a new path to path variable. It should be the place of bin.
Upvotes: 2