View Full Version : can't compile with gcc: can't find <stdio.h>

03-14-2007, 06:03 PM
On my VPS site I'm trying to use gcc but I can't even compile a hello world program:
#include <stdio.h>

printf("Hello World\n");
if I try to compile I get:

gcc helloWorld.c
helloWorld.c:1:19: stdio.h: No such file or directory

but if I execute:
gcc -print-search-dirs I get:
install: /usr/lib/gcc-lib/i386-redhat-linux/2.96/

programs: =/usr/lib/gcc-lib/i386-redhat-linux/2.96/:

libraries: =/usr/lib/gcc-lib/i386-redhat-linux/2.96/:

This may be proper, I don't know where the usual include files should be but I notice there are no gcc related files in /usr/libexec, unlike on my fedora core 4 system at home.

Since they provide gcc I assume it normally works and I'm making a naive mistake, can anyone help?

03-14-2007, 08:51 PM
It's in /usr/include. If it's not there, go into the site manager and uninstall and reinstall the gnu compiler collection. If it's still not there after that, you should contact support.