public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Compiler isn't finding system header files
@ 2007-11-28  0:24 mofomojo
  2007-11-28  9:24 ` Brian Dessent
  0 siblings, 1 reply; 3+ messages in thread
From: mofomojo @ 2007-11-28  0:24 UTC (permalink / raw)
  To: gcc-help

When I compile any program with GCC, specifying that it is a .c file
and that I want to compile it as a C-file to produce a binary, I get -
with any file - something like this :


 "*any source file here* :stdio.h: No such file or directory"


I have the libraries installed, and EVEN if I specify the location of
the file - in a command like -I/usr/lib/include/gcc/i486
-linux-gnu/4.1.2/include/ssp/ (where the system headers are
installed)I still get the output ...


 "*any source file here*:stdio.h: No such file or directory"


where, obviously, stdio.h is a system header file specified by the .c
source file to be compiled with. I don't know much about programming
or anything like that, but I do know that something is wrong somewhere
and that my compiler isn't configured right to find the files... or
something like that.

I have installed, on my system, Debian 4.0 Gnu/Linux with GCC
installed from the CD provided from the Debian distribution site
(debian.org ).  I've struggled at this for hours trying to figure what
is wrong, and I've wasted most of the daylight today trying at this
which is very valuable to me, seeing as winter is approaching and I
get very little daylight as is with school and everything :(

 this is the summary of the output for what I tried to compile here.
It failed to produce the binary.

 gcc -g -I/usr/lib/include/gcc/i486-linux-gnu/4.1.2/include/ssp/ -c
pdf417decode.c
 pdf417decode.c:39:19: error: stdio.h: No such file or directory



If anyone could help, I would be very very gracious so I don't waste
any more time on this problem. It's really giving me headaches.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Compiler isn't finding system header files
  2007-11-28  0:24 Compiler isn't finding system header files mofomojo
@ 2007-11-28  9:24 ` Brian Dessent
  2007-11-28 22:46   ` mofomojo
  0 siblings, 1 reply; 3+ messages in thread
From: Brian Dessent @ 2007-11-28  9:24 UTC (permalink / raw)
  To: mofomojo; +Cc: gcc-help

mofomojo wrote:

> I have the libraries installed, and EVEN if I specify the location of
> the file - in a command like -I/usr/lib/include/gcc/i486
> -linux-gnu/4.1.2/include/ssp/ (where the system headers are
> installed)I still get the output ...

You should never have to do that, so don't try.  (And for the record,
that directory is only for libssp headers, it is not where things like
stdio.h would be in general; they are under /usr/include because they
are not part of gcc.)  It means there is another problem.

> I have installed, on my system, Debian 4.0 Gnu/Linux with GCC
> installed from the CD provided from the Debian distribution site
> (debian.org ).  I've struggled at this for hours trying to figure what
> is wrong, and I've wasted most of the daylight today trying at this
> which is very valuable to me, seeing as winter is approaching and I
> get very little daylight as is with school and everything :(
> 
>  this is the summary of the output for what I tried to compile here.
> It failed to produce the binary.
> 
>  gcc -g -I/usr/lib/include/gcc/i486-linux-gnu/4.1.2/include/ssp/ -c
> pdf417decode.c
>  pdf417decode.c:39:19: error: stdio.h: No such file or directory

Headers like stdio.h are not part of gcc.  They're part of the libc, so
no amount of installing gcc packages is going to change that.  Most
distros split libraries into the runtime and developer parts, because
most users don't need the developer parts; but they're required for
compilation, which is a developer task.  Thus you need to install the
libc-dev package (apt-get install libc-dev).  However, a better route is
to install the metapackage build-essential (apt-get install
build-essential) which is like a placeholder for all the packages that
are commonly required to build C and C++ programs.

> If anyone could help, I would be very very gracious so I don't waste
> any more time on this problem. It's really giving me headaches.

I notice that you didn't get a reply and posted to the main gcc list. 
That's somewhat of an inconsiderate thing to do.  The whole point of
having separate lists for help using gcc and for people developing gcc
is to make it easier on people that already are very busy and get a lot
of mail.  By posting to both you defeat the purpose for having two
lists, and some people might consider that rude.

Brian

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Compiler isn't finding system header files
  2007-11-28  9:24 ` Brian Dessent
@ 2007-11-28 22:46   ` mofomojo
  0 siblings, 0 replies; 3+ messages in thread
From: mofomojo @ 2007-11-28 22:46 UTC (permalink / raw)
  To: gcc-help

Thanks for speaking down to me. This problem has already been cleared up.

On Nov 28, 2007 5:19 PM, Brian Dessent <brian@dessent.net> wrote:
> mofomojo wrote:
>
> > I have the libraries installed, and EVEN if I specify the location of
> > the file - in a command like -I/usr/lib/include/gcc/i486
> > -linux-gnu/4.1.2/include/ssp/ (where the system headers are
> > installed)I still get the output ...
>
> You should never have to do that, so don't try.  (And for the record,
> that directory is only for libssp headers, it is not where things like
> stdio.h would be in general; they are under /usr/include because they
> are not part of gcc.)  It means there is another problem.
>
> > I have installed, on my system, Debian 4.0 Gnu/Linux with GCC
> > installed from the CD provided from the Debian distribution site
> > (debian.org ).  I've struggled at this for hours trying to figure what
> > is wrong, and I've wasted most of the daylight today trying at this
> > which is very valuable to me, seeing as winter is approaching and I
> > get very little daylight as is with school and everything :(
> >
> >  this is the summary of the output for what I tried to compile here.
> > It failed to produce the binary.
> >
> >  gcc -g -I/usr/lib/include/gcc/i486-linux-gnu/4.1.2/include/ssp/ -c
> > pdf417decode.c
> >  pdf417decode.c:39:19: error: stdio.h: No such file or directory
>
> Headers like stdio.h are not part of gcc.  They're part of the libc, so
> no amount of installing gcc packages is going to change that.  Most
> distros split libraries into the runtime and developer parts, because
> most users don't need the developer parts; but they're required for
> compilation, which is a developer task.  Thus you need to install the
> libc-dev package (apt-get install libc-dev).  However, a better route is
> to install the metapackage build-essential (apt-get install
> build-essential) which is like a placeholder for all the packages that
> are commonly required to build C and C++ programs.
>
> > If anyone could help, I would be very very gracious so I don't waste
> > any more time on this problem. It's really giving me headaches.
>
> I notice that you didn't get a reply and posted to the main gcc list.
> That's somewhat of an inconsiderate thing to do.  The whole point of
> having separate lists for help using gcc and for people developing gcc
> is to make it easier on people that already are very busy and get a lot
> of mail.  By posting to both you defeat the purpose for having two
> lists, and some people might consider that rude.
>
> Brian
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-11-28 21:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-28  0:24 Compiler isn't finding system header files mofomojo
2007-11-28  9:24 ` Brian Dessent
2007-11-28 22:46   ` mofomojo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).