palcal
March 10th, 2007, 05:03 PM
I've never programmed on Linux before, so I've probably made some really simple mistake :P I'm trying to compile a Hello, World application to test the GCC C compiler, and already I'm receiving an error telling me stdio doesn't exist.
$ gcc -ansi -pedantic -Wall -O2 -o hello hello.c
hello.c:1:19: error: stdio.h: No such file or directory
hello.c: In function ‘main’:
hello.c:5: warning: implicit declaration of function ‘printf’
hello.c:5: warning: incompatible implicit declaration of built-in function ‘printf’
hello.c is in a programming directory in my home. Could that be the problem? Though I would of thought GCC would have a PATH variable to the include files.
$ gcc -ansi -pedantic -Wall -O2 -o hello hello.c
hello.c:1:19: error: stdio.h: No such file or directory
hello.c: In function ‘main’:
hello.c:5: warning: implicit declaration of function ‘printf’
hello.c:5: warning: incompatible implicit declaration of built-in function ‘printf’
hello.c is in a programming directory in my home. Could that be the problem? Though I would of thought GCC would have a PATH variable to the include files.