I've run across a linking problem with libtool that frankly has me stymied. (I'm using version 1.5.2, on Mac OS X 10.3, if that matters.)
The general gist is that when libtool automatically decides what libraries to link in, it can get the link order wrong, which causes dependency problems.
Here's the specifics of my problem.
This is what gets called by my makefile:
/bin/sh ../../libtool --mode=link g++ -g -fomit-frame-pointer -O3 -DNDEBUG -Wall -fno-rtti -pipe -o OUTPUT.la -rpath /usr/local/lib -no-undefined -version-info 5:0:0 -release 0.9 -L/sw/lib -L/usr/X11R6/lib [input .o files] -lXm -lMrm -lUil -lz -lm
Which libtool translates into the following link command:
g++ -dynamiclib -single_module -o OUTPUT.dylib [input .o files] /usr/X11R6/lib/libX11.dylib /usr/X11R6/lib/libXp.dylib /usr/X11R6/lib/libXext.dylib /usr/X11R6/lib/libICE.dylib /usr/X11R6/lib/libSM.dylib /usr/X11R6/lib/libXt.dylib /usr/X11R6/lib/libXmu.dylib -L/usr/X11R6/lib -L/sw/lib /sw/lib/libXm.dylib /sw/lib/libMrm.dylib /sw/lib/libUil.dylib -lz -lm -install_name /usr/local/lib/libhighgui-0.9.5.dylib -compatibility_version 6 -current_version 6.0
Now, here's the problem -- libXm MUST come before libX11 or libXt on the link line, or link errors happen. (See e.g. http://book.onairweb.net/computer/os/X-window/ X_Window_and_Motif_Programming_Guide/ )
So, how do I force libtool to place libXm before the rest of those hard-coded library paths that libtool has automatically decided are necessary?
Thanks,
Zach Pincus Department of Biochemistry and Program in Biomedical Informatics Stanford University School of Medicine
_______________________________________________ Libtool mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/libtool