[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: gcc (was: Beginner's Question)



On Tue, Feb 01, 2000 at 02:34:50PM +0100, tschmid@USU.DE wrote:
> > bash: stdio.h : not found  error message
> > stdio.h file is in the /usr/include
> > Do I have to setup something for gcc  compiler ?
> 
> You have to set an environment variable for the includes, which is called
> INCLUDE.
> 
> For a quick shot, try
> 
> export INCLUDE=/usr/include
> 
> If that works, you can put the export in your profile (or append
> /usr/include to the existing export).
> 
> BTW: This may be obvious, but you have to include stdio.h like this:
> 
>    #include <stdio.h>
> 
> NOT like this:
> 
>    #include "stdio.h"
> 

My gut reaction is that your installation is broken (or you don't have
libc-dev installed?). You should not need to specify /usr/include or
/usr/lib.  Also, I don't think it matters if you #include "stdio.h" or
#include <stdio.h>. The difference, if I understand correctly, is in the
first case, the compiler will look for stdio.h in the current directory
first. If its not found there, then it will look in the standard places
(i.e. /usr/include).  In the second case, it just looks in the standard
places.  This gives you the dubious ability to redefine system header
files. 

-- 
+----------------------------------------------------+
| Eric G. Miller                        egm2@jps.net |
| GnuPG public key: http://www.jps.net/egm2/gpg.asc  |
+----------------------------------------------------+


Reply to: