This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Include directory for gcc
- From: Brian Budge <brian dot budge at gmail dot com>
- To: Arthur Niswar <niswar at int dot uni-karlsruhe dot de>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Thu, 10 Mar 2005 17:05:37 +0100
- Subject: Re: Include directory for gcc
- References: <Pine.GSO.4.21.0503101647500.15133-100000@inscl6.etec.uni-karlsruhe.de>
- Reply-to: Brian Budge <brian dot budge at gmail dot com>
Use the -I option
say something like: gcc -I/usr/local -o executable input.c
Brian
On Thu, 10 Mar 2005 16:58:00 +0100 (MET), Arthur Niswar
<niswar@int.uni-karlsruhe.de> wrote:
> I have a problem in compiling a very simple program with gcc on Solaris.
> Here it is:
>
> # gcc hello.c -o hello
> hello.c:0: /usr/local/include/.: Permission denied
>
> The program hello.c itself:
>
> # less hello.c
> #include <stdio.h>
>
> int main()
> {
> printf("Hello World!\n");
>
> return;
> }
>
> As a fact, most of the computer in my lab are Linux, and only several of
> them (if not just 1!) are Solaris. So I suspect the gcc search path for
> include files is configured for Linux (1st search in /usr/local/include).
>
> How can I "direct" gcc to first search in the normal /usr/include ?
>
> Thanks!
>
> -------
> Arthur Niswar Email : niswar@int.uni-karlsruhe.de
> Institut für Nachrichtentechnik Tel : +49 721 608 3791
> Universität Karlsruhe Fax : +49 721 608 3799
> 76128 Karlsruhe, Germany
>
>