Subject: Re: dynamic linking
To: None <>
From: Quentin Garnier <>
List: tech-userlevel
Date: 03/19/2003 09:53:56
Le Wed, 19 Mar 2003 10:31:58 +0200
Lucio De Re a ecrit :
> 	Shared object "" not found
> 	export
> 	LD_LIBRARY_PATH=/usr/lib:/usr/X11R6/lib:/usr/pkg/lib:/usr/local/l
> 	ib
> solves the problem perfectly adequately, but I'm lost as to why this
> is required.  I thought I knew how ".so"s worked, but evidently I'm
> missing something.

ld.elf_so needs a hint on where to find libraries. You can add hints in
/etc/ (adding /usr/X11R6/lib here is fine), or add it in the
linked file it's self, it's called a RPATH entry.

-Wl,-R ld/gcc option adds the convenient hint entry into the resulting
binary. Usually you will prefer the later solution, but then you have to
modify the clinking options to add the correct one.

Quentin Garnier -
"Feels like I'm fiddling while Rome is burning down.
Should I lay my fiddle down and take a rifle from the ground ?"
Leigh Nash/Sixpence None The Richer, Paralyzed, Divine Discontents, 2002.