Re: installing 2.8



Dugas, Alan wrote:
> I see your point!  What's the -R switch/option do?

At link time, the link editor searches directories specified with the -L
flag in order to find the libraries specified with -l flags. Then
those libraries are recorded in the executable, but it's only their name,
not the full path.

At run-time, dynamic linker needs to find those libraries. By default,
it only searches /usr/lib directory for 32-bit programs. So it won't
be able to find a library which lives in /usr/local/lib.

But if you use -R/usr/local/lib at link time, that directory will be
recorded in the executable and run-time linker will use it to search
for libraries. So if the application is using some library from
/usr/local/lib, then it should use -R/usr/local/lib at link time.
That tells the run-time linker to look there.

It's possible to use different directories with -L and -R flags or
use some special things with -R (like $ORIGIN for location independent
search). But you usually don't need them, so using the same directory
list for -L and -R works fine in general.

-- 
 .-.   .-.    Sarcasm is just one more service we offer.
(_  \ /  _)
     |        dave srce hr
     |        dave fly srk fer hr




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]