[code]some code here[/code]
will result in Code:
some code here |
my program is
Code:
#include <stdio.h> Code:
gcc: error: c.c: No such file or directory sorry for my knowing nothingness i am used to using a windows compiler. |
gcc can't find your file. Did you specify the right path to your source code?
|
Quote:
|
Well, this is speculation but it looks like there is a compiler but nothing to compile.
I would suggest going into the directory that has the c.c file and then executing gcc c.c. Else provide the full path name eg 'gcc /home/name/dir/c.c'. Hope this helps. |
Hi Archie101;
OK, your code, the content of "hello.c": Code:
#include <stdio.h> /* include the headers that have printf in them */ Code:
bash$ gcc -o hello hello.c Now if it throwing errors on compile time then the problem is likely that it cannot find the libraries it needs. Can you check that there is a file called "/usr/lib/libstdc++*" ? also a quick explanation of how you installed gcc and the Linux version/distribution you are using would help. |
It's not finding it because you're not in the directory that's the c file is in. cd to that dir then run gcc again.
|
Quote:
|
All times are GMT -5. The time now is 12:40 PM. |