[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Getting the wrong library
From: |
Peter O'Gorman |
Subject: |
Getting the wrong library |
Date: |
Sun, 1 Jun 2003 23:13:35 +0900 |
Hi,
Ben Reed just pointed out the following problem to me:
/bin/sh ../../libtool --mode=link --tag=CXX g++ -Wnon-virtual-dtor
-Wno-long-long -Wundef -Wall -pedantic -W -Wpointer-arith
-Wmissing-prototypes -Wwrite-strings -Os -fno-exceptions
-fno-check-new -DQT_NO_TRANSLATION -DQT_CLEAN_NAMESPACE
-DQT_NO_ASCII_CAST
-DQT_NO_COMPAT -L/usr/X11R6/lib -o dcopidl -L/usr/X11R6/lib
-L/opt/local/lib -L/opt/local/lib main.o dcopidl.all_cc.o -lqt-mt
-lz -lpng -lz -lm -lXext -lX11 -lSM -lICE -lpthread -lfreetype
-L/opt/local/lib -ldl
g++ -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -pedantic -W
-Wpointer-arith -Wmissing-prototypes -Wwrite-strings -Os -fno-exceptions
-fno-check-new -DQT_NO_TRANSLATION -DQT_CLEAN_NAMESPACE
-DQT_NO_ASCII_CAST -DQT_NO_COMPAT -o dcopidl main.o dcopidl.all_cc.o
-Wl,-bind_at_load -L/usr/X11R6/lib -L/opt/local/lib -lqt-mt -lpng -lz
-lm -lXext -lX11 -lSM -lICE -lpthread
/opt/local/lib/libfreetype.dylib -ldl
The problem being the /opt/local/lib/libfreetype.dylib... it should
have linked against /usr/X11R6/lib/libfreetype.dylib, but because there
is no .la in /usr/X11R6/lib and there was a .la in /opt/local/lib, it
found the wrong one.
I think this code should be removed from ltmain.in because it makes bad
assumptions:
for searchdir in $newlib_search_path $lib_search_path
$sys_lib_search_path $shlib_search_path; do
# Search the libtool library
lib="$searchdir/lib${name}.la"
if test -f "$lib"; then
found=yes
break
fi
done
Thanks,
Peter
- Getting the wrong library,
Peter O'Gorman <=