It looks like you are missing the glibc-headers package.
$ rpm -qf /usr/include/stdio.h
glibc-headers-2.3.4-2.13
Alfred Hovdestad, RHCE
University of Saskatchewan
Venkatesh Subramanian wrote:
Folks,
I am a newbie to Linux, so pl. pardon me if my question is stupid.
I installed Red Hat enterprise version 4.0 on Pentium based PC. I selected
almost all development tools that come with Red Hat Enterprise CDs. I am
trying to compile a simple program - hello.c
#include <stdio.h>
int a, c;
static void
foo (int b)
{
c = a + b;
printf ("%d + %d = %d\n", a, b, c);
}
int
main (void)
{
int b;
a = 3;
b = 4;
printf ("Hello, world!\n");
foo (b);
return 0;
}
gcc -g hello.c -o hello
hello.c:1:19: stdio.h: No such file or directory
when I look at /usr/include directory, I cannot see stdio.h there. Many
other standard ANSI C header files are missing too. I just installed linux
few hours ago, so certainly I did not delete anything.
When I did
locate stdio.h
it reported
/usr/share/splint/lib/stdio.h
/usr/share/man/man0p/stdio.h.0p.gz
/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE/nostdio.h
these stdio.h still does not still compile my code. Any way /usr/include
should have stdio.h correct?
Do I need to install any special libraries (GNU C libraries?) or packages to
get the header files for Red Hat enterprise. When I tried Fedora earlier, I
did not have the problem of missing header files.
Please let me know what I need to install to get this program to compile and
provide any instructions/links for downloading it.
Thanks
Venkat
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subjectunsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list