gcc - missing headers and libraries

These ought to be easy for those familiar with gcc :)

if I try to compile:

#include <stdio.h>
int main()
puts("Hello world\n");
return 0;

gcc reports:

test.cpp: stdio.h: File or directory not found.

Then I tried to exclude the dependency on the header file:

int main()
return 0;

and gcc seems to compile but does not link:

/usr/bin/ld: cannot open crt1.o: File or directory not found

From / I search:
find -name crt1.o
find -name stdio.h
and the files are not found.

So, my questions are:

1) Which RPM contains the headers and libraries?

2) What would ba a "standard" place to put these?

3) What is the most straightforward way to inform gcc of their location, other than options or makefiles? Is there an environment variable I can set for each?
Who is Participating?
jlevieConnect With a Mentor Commented:
The include files should be in /usr/include and the libs would be in /usr/lib. On a Linux system these should have been installed by default if your installation was done in a way as to select a "workstation" type of install. If you did some sort of custom install where you picked only what you thought you needed, then you need to go back and install the "developers" support items. Using a Gui package manager, like kpackage or gnorpm, will make it easier to figure out what else needs to be added.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.