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
[EMAIL PROTECTED], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
_______________________________________________
http://lists.gnu.org/mailman/listinfo/libtool

Reply via email to