Hello Gary

I resend my question from gmail.

Most likely your libhdf.la has -L/usr/libs in its dependency_libs entry.
> You can fix that by editing the libhdf.la file to pass the library name by
> its full path, or by adjusting the install process of libhdf not to record
> -L/usr/libs there.
>

dependency_libs in libhdf5.la does not contain -L/usr/lib. I have already
checked that.
dependency_libs=' -lpthread -lz -lm'

Regards
Christian

I link 3 libraries with libtool. The first one is linked with hdf lib that
is in system (/usr/lib), the
second one is linked with vtk lib that is not in system ($VTKHOME) and the
third one is linked
with the 2 previous libs.

The problem is that there is another vtlk lib in system (/usr/lib) and
libtool adds an -L/usr/lib when adding
hdf dependency so my third lib is linked with the two vtk libs (in system
and in VTKHOME).

I have not found a way to handle this situation. What would be  the right
way ?

Here is a simplified script of my link:

cd src/p1
/bin/sh ../../libtool --tag=CXX --mode=link g++ -o libhello.la -rpath
/local/cchris/pkg/libtool/test22/myinstall/lib hello.lo -lhdf5

cd ../p2
/bin/sh ../../libtool --tag=CXX --mode=link g++ -o libprog.la -rpath
/local/cchris/pkg/libtool/test22/myinstall/lib prog.lo
-L/local/cchris/pkg/vtk/install/lib/vtk-5.6 -lvtkCommon

cd ../p3
/bin/sh ../../libtool --tag=CXX --mode=link g++ -o libviewer.la -rpath
/local/cchris/pkg/libtool/test22/myinstall/lib viewer.lo ../p1/libhello.la../p2/
libprog.la

Regards
Christian Caremoli
_______________________________________________
http://lists.gnu.org/mailman/listinfo/libtool

Reply via email to