I am trying to pick up a local installed copy of libNITF in /volume19/ix86-linux/lib rather than the copy of libNITF in /swl/ix86-linux/lib. /swl/ix86-linux/lib is needed for other libraries; it also contains gcc, etc. LD_LIBRARY_PATH is set to /swl/ix86-linux/lib.
The call to libtool yields: /bin/sh ../../libtool --mode=link g++ ... -o libXWImage.la \ -rpath /volume19/ix86-linux/lib \ ... AvirisImageFile.lo ... \ -L/volume19/ix86-linux/lib -L/swl/ix86-linux/lib ... -lNITF ... What libtool invokes is: g++ -shared ... .libs/AvirisImageFile.o ... \ -Wl,--rpath -Wl,/swl/ix86-linux/lib -Wl,--rpath -Wl,/volume19/ix86-linux/lib \ ... -L/swl/ix86-linux/lib/. ... -L/volume19/ix86-linux/lib \ ... /volume19/ix86-linux/lib/libNITF.so ... -o .libs/libXWImage.so.1.1.13 As a result 'ldd libXWImage.so.1.1.13' indicates that libXWImages is (for me, incorrectly) picking up the libNITF from /swl/ix86-linux/lib. Note this happens in spite of the presence of '/volume19/ix86-linux/lib/libNITF.so'! If I run the 'g++ -shared ...' line with the -Wl,--rpath's reversed (so that '-Wl,--rpath -Wl,/volume19/ix86-linux/lib' appears first) I get the result that I want. So how does libtool determine the order of the -Wl,--rpath's in the line that it invokes? I have looked at the libtool documentation and libtool mail archives, but have not found anything. It seems to me that libtool, to begin with, should order the -Wl,--rpath's to match the order of the -L's found in LDFLAGS (or LIBS). I am using autoconf-2.57, automake-1.7.5, and libtool-1.5 on linux, solaris, and irix6.5 systems. - Ted _______________________________________________ Libtool mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/libtool