From owner-freebsd-chat Sat Nov 23 23:38:56 2002 Delivered-To: freebsd-chat@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A7A6537B401 for ; Sat, 23 Nov 2002 23:38:54 -0800 (PST) Received: from marvin.bsdng.org (24-159-234-52.jvl.wi.charter.com [24.159.234.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id AE7D243E4A for ; Sat, 23 Nov 2002 23:38:53 -0800 (PST) (envelope-from mkm@marvin.bsdng.org) Received: from marvin.bsdng.org (marvin [127.0.0.1]) by marvin.bsdng.org (8.12.6/8.12.5) with ESMTP id gAO7bea9004413; Sun, 24 Nov 2002 01:37:40 -0600 (CST) (envelope-from mkm@marvin.bsdng.org) Received: (from mkm@localhost) by marvin.bsdng.org (8.12.6/8.12.6/Submit) id gAO7beRx004412; Sun, 24 Nov 2002 01:37:40 -0600 (CST) Date: Sun, 24 Nov 2002 01:37:40 -0600 From: Kyle Martin To: Khairil Yusof Cc: freebsd-chat@freebsd.org Subject: Re: newbie question about make and include files Message-ID: <20021124073740.GB1450@marvin.bsdng.org> References: <1038119825.47127.115.camel@daemon.home> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1038119825.47127.115.camel@daemon.home> User-Agent: Mutt/1.4i Sender: owner-freebsd-chat@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Sun, Nov 24, 2002 at 02:49:44PM +0800, Khairil Yusof wrote: > Subject: newbie question about make and include files > From: Khairil Yusof > To: freebsd-chat@FreeBSD.ORG > Date: 24 Nov 2002 14:49:44 +0800 > > Not sure if this is the right place to ask, if not please point me in > the right direction. > > I've been trying to compile some small programs but I come across errors > with include headers: > > $gcc -s -O3 -funroll-loops -fomit-frame-pointer -mpentium -O2 -pipe > -march=pentiumpro -c intro.c -lggi > > In file included from intro.c:24: > intro.h:25: ggi.h: No such file or directory > > intro.h has: > > #include > > I have the required files (ggi.h) at: > > /usr/local/include/ggi > but that isn't included (only /usr/include) where do I set this > variable? adding include directories can be done with -I, ie: -I/usr/local/include > Playing around a symlink in usr/include confirms my hunch that > /usr/local/include isn't being included. > > after that I get this: > > /usr/libexec/elf/ld: cannot find -lggi > > After reading man 1 gcc, I see that it's trying to link to the ggi > library. Again this is in /usr/local/lib not /usr/lib the library directorys can be specified just like the include directories, but with -L, ie -L/usr/local/lib -- Kyle Martin || mkm@IEEE.org || http://www.BSDng.org "Profanity is the only language all programmers understand." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-chat" in the body of the message