This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Newbie needs help setting up GCC and GLIBC


stdio.h should be in /usr/include.
All the _libraries_ you need are present, but for some reason the
include files seem to be missing. I recommend you reinstall the
development stuff.

Terence Kirk wrote:
> 
> I have many years experience working with C/++ in the Wintel world, and
> I'm trying to get my bearings in the Linux universe. I  am running
> RedHat 5.1.
> 
> When I do an "rpm -qa | grep gcc", I get the following:
> 
>     gcc-2.7.2.3-13
> 
> When I do an "rpm -qa | grep lib", I get the following:
> 
>     glibc-2.0.7-19
>     libtermcap-2.0.8-9
>     zlib-1.1.2-2
>     cracklib-2.7-2
>     cracklib-dicts-2.7-2
>     glib-1.0.1-3
>     gnome-libs-0.13-10
>     imlib-1.6-1
>     libc-5.3.12-27
>     libg++-2.7.2.8-9
>     libgr-2.0.13-12
>     libgr-progs-2.0.13-12
>     libjpeg-6b-5
>     libpng-1.0.1-3
>     libstdc++-2.8.0-12
>     libtiff-3.4-4
>     libungif-3.0-4
>     pythonlib-1.22-1
>     svgalib-1.2.13-3
>     XFree86-libs-3.3.2-16
> 
> I have written the following program:
> 
>     #include <stdio.h>
> 
>     main()
>     {
>             printf("Hello world");
>     }
> 
> (Yeah, I know, pretty original)
> 
> I compile with the following command...
> 
>     gcc test.c -o test
Do not call executables 'test'--often there's a system program with the
same name.
> 
> ...and I get the following error message:
> 
>     test.c:1: stdio.h: No such file or directory
> 
> I have executed...
> 
>     find /. -name stdio.h -print
> 
> ...and sure enough, it's not there. I have scoured the gcc how-to, and
> tried to follow the glib how-to, as well as the gnu.org site, but
> frankly I'm lost. There's too much detail. I'm not sure whether rpm
> installs the binaries, or whether I have to go through the whole compile
> / link process for the libraries or what. I've spent several hours in
> bookshops paging through every book I can find on Linux or C++ for some
> clues, and searched every news group that seems remotely related to GNU,
> but no luck yet.
No. It shouldn't come to that...actually, with the include files
missing, I'm not sure how you've compiled _anything_!
Just make sure the development stuff is installed.
> Can anyone tell me where I can find a simple step by step guide on how
> to become operational, or even better tell me what I'm doing wrong?
> 
> Thanks
> 
> Terence Kirk

HTH,
--ag
-- 
Artie Gold, Austin, TX
mailto:agold@bga.com or mailto:agold@cs.utexas.edu
--
"If you come to a fork in the road, take it." L. P. Berra


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]