Subject: Re: non /usr/lib libraries
To: Wojciech Puchar <wojtek@chylonia.3miasto.net>
From: Daniel Mercer <dmercer@fantoccini.com>
List: netbsd-users
Date: 08/01/2002 08:22:38
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi there,
You need to compile in the runtime path so that the
linker can find the libraries to link to:
In this case:
cc -o program program.o -L/usr/pkg/lib -R/usr/pkg/lib -lreadline -lcurses
Adding paths to shared library directories can be
done by making entries in /etc/ld.so.conf but, I
think that this isn't considered the Right Thing.
Dan M.
On Thursday, August 1, 2002, at 08:12 AM, Wojciech Puchar wrote:
> how to link program that needs .so library from /usr/pkg/lib (readline
> that case) so it will know this directory runtime?
>
> when i do
>
> cc -o program program.o -L/usr/pkg/lib -lreadline -lcurses
>
> it then needs to be run with
>
> LD_LIBRARY_PATH=/usr/pkg/lib ./program
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (Darwin)
Comment: For info see http://www.gnupg.org
iD8DBQE9SVJCcDyW3q/bK28RAmPwAKDf3N7PlAOjhNFGasRiN89gMm0h2ACeIkoe
NMXbWW4PA/NOfODxEQjfHKs=
=Vngk
-----END PGP SIGNATURE-----