My latest changes are not working too well ...
on i86-linux:
make[3]: Entering directory `/u/mai/compile/lesstif/Production/clients/Motif-2.0/uil'
/bin/sh ../../../libtool --mode=link gcc -O4 -mcpu=pentium -Wall -Wimplicit
-Wstrict-prototypes -Wpointer-arith -o uil Attribute.o
Callback.o Expression.o ExpressionList.o FakeWidget.o Include.o MrmTypes.o glue.o
yacc.o lex.o main.o ../../../lib/Mrm-2.0/libMrm.la
../../../lib/Xm-2.0/libXm.la -L/usr/X11R6/lib -lXt -lSM -lICE -lX11
gcc -O4 -mcpu=pentium -Wall -Wimplicit -Wstrict-prototypes -Wpointer-arith -o
.libs/uil Attribute.o Callback.o Expression.o
ExpressionList.o FakeWidget.o Include.o MrmTypes.o glue.o yacc.o lex.o main.o
../../../lib/Mrm-2.0/.libs/libMrm.so -L../Xm-2.0/.libs
-lXm ../../../lib/Xm-2.0/.libs/libXm.so -L/usr/X11R6/lib -lXt -lSM -lICE -lX11 -lm
-L/usr/X11R6/lib -lXt -lSM -lICE -lX11 -Wl,--rpath
-Wl,/home/mai/LessTif/Motif2.0/lib
../../../lib/Mrm-2.0/.libs/libMrm.so: undefined reference to `XmCreateCSText'
../../../lib/Mrm-2.0/.libs/libMrm.so: undefined reference to `XmCreateScrolledCSText'
collect2: ld returned 1 exit status
make[3]: *** [uil] Error 1
Similar picture on digital unix 4.0:
/bin/sh ../../../libtool --mode=link cc -O0 -g -std1 -warnprotos -scope_safe
-I/home/mai/include -L/home/mai/lib -o newuil newuil.o
../../../lib/Uil-2.0/libUil.la ../../../lib/Mrm-2.0/libMrm.la
../../../lib/Xm-2.0/libXm.la -lXt -lSM -lICE
-lX11 -ldnet_stub
cc -O0 -g -std1 -warnprotos -scope_safe -I/home/mai/include -L/home/mai/lib -o
.libs/newuil newuil.o
../../../lib/Uil-2.0/.libs/libUil.so ../../../lib/Mrm-2.0/.libs/libMrm.so
-L../../lib/Xm-2.0/.libs -lXm
../../../lib/Xm-2.0/.libs/libXm.so -lXt -lSM -lICE -lX11 -ldnet_stub -lm -lXt -lSM
-lICE -lX11 -ldnet_stub -Wl,-rpath
-Wl,/home/mai/LessTif/Motif2.0/lib
ld:
Warning version mismatch for shared library libXm.so
newuil depends on version motif1.2 and libMrm.so depends on version 2.0
creating newuil
We don't get the stuff linked correctly, even if the
-L../Xm-2.0/.libs in the first example is replaced by the correct path.
Ok, where are our libtool experts?
The question (to repeat it) has two parts:
- how do we tell libtool that libfoo depends on some uninstalled, but
just few seconds ago created by libtool library libbar?
Currently we do add -L../foo/.libs -lfoo to the linker command for the lib
- how we in turn tell libtool how to link an application which
dependends on both?
Currently we add ../foo/libfoo.la to LDADD
At first the libraries look fine here.
But then the -lXm somehow picks up the real Motif lib from the system
(my guess).
To avoid this one could specify the file explicitly
../foo/libfoo.so
but this is non-portable (.so, etc.) %-\
--
Alexander Mai
[EMAIL PROTECTED]