From owner-freebsd-questions Fri Oct 20 13:57:57 2000 Delivered-To: freebsd-questions@freebsd.org Received: from ghost.blacktrap.net (20-230.CampusNet.ucl.ac.be [130.104.20.230]) by hub.freebsd.org (Postfix) with ESMTP id C961B37B4C5 for ; Fri, 20 Oct 2000 13:57:53 -0700 (PDT) Received: from anoat.blacktrap.net (anoat [192.168.1.11]) by ghost.blacktrap.net (8.11.1/8.11.0) with ESMTP id e9KKvpn00876 for ; Fri, 20 Oct 2000 22:57:51 +0200 (CEST) (envelope-from lex@blacktrap.net) Received: (from lex@localhost) by anoat.blacktrap.net (8.11.1/8.11.0) id e9KKAv640727 for freebsd-questions@FreeBSD.ORG; Fri, 20 Oct 2000 22:10:57 +0200 (CEST) (envelope-from lex) Date: Fri, 20 Oct 2000 22:10:57 +0200 From: Chive To: freebsd-questions@FreeBSD.ORG Subject: Re: linking oddness Message-ID: <20001020221057.A40152@blacktrap.net> References: <20001020135840.P11549@genuity.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20001020135840.P11549@genuity.net>; from jdiehl@genuity.net on Fri, Oct 20, 2000 at 01:58:40PM -0400 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, Oct 20, 2000 at 01:58:40PM -0400, Joe Diehl wrote: > I was wondering if someone can help me out here, seeing as I'm now rather lost. > I'm having problems with linking libraries that I install in /usr/local/lib. > > For instance: > > $ LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/usr/X11R6/lib:/lib > $ export LD_LIBRARY_PATH > $ gcc -o test test.o -ljpeg > /usr/libexec/elf/ld: cannot find -ljpeg > $ gcc -o test test.o -L/usr/local/lib -ljpeg > $ ldd test > test: > libjpeg.so.62 => /usr/local/lib/libjpeg.so.62 (0x28064000) > libc.so.4 => /usr/lib/libc.so.4 (0x28082000) > LIBRARY_PATH is the variable to use for compilation... Wonder why this isn't in gcc or ld manpage. You can find it with "info gcc". Ciao, Chive. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message