🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.linux
Article #1103

Re: How do I add a library to the include path?

#1103
From: Mehran Rezaei
Date: Fri, 28 Jan 2000 00:00
22 lines
1726 bytes
Jack Kelly Dobson wrote:

> Hello?
>
> Can someone tell me how to add a library to the include path?
>
> I'd like to be able to #include "foo.h" rather than #include
> "/usr/local/include/foo/foo.h".
>
> Any ideas?
>
> thx j-

as you know if you have the header file in "/usr/include" then all you
do is #include <headerfilename.h>
and then compile your program without any switch. the alternative is to
have the header file somewhere else.
then you just simply say #include "headerfilename.h" and as you compile
your program you must include the path where header file exists:
"gcc filename.c -I/usr/local/include/foo"
speaking for myself,
Mehran,
Technical Details
Message-ID: <38921372.11CA6730@crash1.eb.uah.edu>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <389218F4.E6FA9DA2@binc.net>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,741afaa4ec23a612
X-Google-Attributes: gid11318c,public
X-Google-Thread: faa64,741afaa4ec23a612
X-Google-Attributes: gidfaa64,public
X-Google-Thread: 10a73c,741afaa4ec23a612
X-Google-Attributes: gid10a73c,public
X-Google-Thread: 100c5f,741afaa4ec23a612
X-Google-Attributes: gid100c5f,public
X-Google-Thread: f65d0,741afaa4ec23a612
X-Google-Attributes: gidf65d0,public
From: Mehran Rezaei <rmehran@crash1.eb.uah.edu>
Subject: Re: How do I add a library to the include path?
Date: 2000/01/28
Message-ID: <38921372.11CA6730@crash1.eb.uah.edu>
X-Deja-AN: 578931545
Content-Transfer-Encoding: 7bit
References: <389218F4.E6FA9DA2@binc.net>
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: news@news.uah.edu
X-Trace: info2.uah.edu 949097498 25066 146.229.13.150 (28 Jan 2000 22:11:38 GMT)
Organization: uah
Mime-Version: 1.0
NNTP-Posting-Date: 28 Jan 2000 22:11:38 GMT
Newsgroups: alt.linux,alt.os.linux,gnu.gcc,gnu.gcc.help,linux.dev.gcc