libtool
[Top][All Lists]
Advanced

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

Re: Multiple -rpaths


From: Bob Friesenhahn
Subject: Re: Multiple -rpaths
Date: Sun, 2 Nov 2008 13:22:14 -0600 (CST)

On Sun, 2 Nov 2008, Jan Engelhardt wrote:

I have two libraries in paths that are not searched by default (e.g.
/opt/foo/lib). So I have this in my pkgconfig files:

foo.pc: Libs:   -L${libdir} -lfoo
bar.pc: Libs:   -L${libdir} -lbar

The linker will find -lfoo,-lbar and successfully create the output file
-- which is an .la library --, but running `ldd` on it says
"libfoo.so.0 => not found", and that seems fine to me, since no -rpath
was given. So I try to add -rpath in the pkgconfig files:

The -rpath option is for the run-time linker search path. It is not used to find libraries during compilation. A normal convention for run-paths is to use a ':' to allow specifying multiple directories (just like PATH). You should list any dependency libraries via foo_la_LIBADD rather than foo_la_LDFLAGS. Please refer to the documentation.

Bob
======================================
Bob Friesenhahn
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]