Subject: Re: static vs. dynamic runtime linking, again (was: PAM and su -K)
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: Jason Thorpe <thorpej@shagadelic.org>
List: tech-userlevel
Date: 01/25/2005 09:20:30
On Jan 24, 2005, at 3:17 PM, der Mouse wrote:

> I was dealing with a new 2.0 install.  I tried to link an X program.
> The linker couldn't find -lXext -lX11.  So I added -L/usr/X11R6/lib
> (from relatively hazy memory) and it found them - and promptly fell
> over when I tried to run it, saying it couldn't find some libXext.so
> file.

Like on all ELF systems, you need to add -R/usr/X11R6/lib, as well, 
since /usr/X11R6/lib is not in the default run-time library search path 
for the dynamic linker.

         -- Jason R. Thorpe <thorpej@shagadelic.org>