It looks like you have a gcc executable on your path, but it can't find something else that it needs.
Make sure that test.c exists and is a regular file (
the first character should be a hyphen)
Now try and preprocess the file
This should spew out a whole lot of C-esque stuff (your preprocessed program).
Now try and compile it without linking
Now try and link it
At what stage does it fail? If you can't preprocess, you probably don't have libc-devel (the C library header files) installed properly. Otherwise, you don't have cpp (the c preprocessor) installed; this probably means you have a messed-up gcc installation.
If it won't link then you're missing part of libc itself. Possibly you only installed the static libraries; try again with the -static flag.
Another test you can do is to run
Code:
ldd `which /usr/bin/gcc`
to see if your gcc executable has any unmet library dependencies you need to install. (Note that ` is a backtick, not an apostrophie. To the left of the 1 key and above Tab on most keyboards).