Error linking against libXt

Lou Losee llosee@hvc.rr.com
Wed Oct 22 20:51:00 GMT 2003


Hi,
I am trying to compile and link the Rob Pike's 'sam' editor available
from the bell labs site.  I am having problems when it comes to linking
the executable.  The statement that is failing is:

gcc -o samterm main.o flayer.o icons.o io.o menu.o mesg.o rasp.o
scroll.o unix.o ../../libframe.a -lm ../../libXg/.libs/libXg.a -lXt
-lX11 -lm -lm ../../libplan9c/.libs/libplan9c.a -lm -lm -lXt -lX11

The error returned is:
/usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/../../../../i686-pc-cygwin/bin/ld: cannot find -lXt

Looking in /usr/X11R6/lib/ I find:
libXt-6.dll.a
libXt.dll.a -> libXt-6.dll.a

So I figured I needed a libXt.a and following the procedure in the
'Building and Using DLLs - Linking Against DLLs' section of Chapter 4 of
the Users Guide, I issued the following commands to create a libXt.a

echo EXPORTS > libXt.def
nm libXt.dll.a | grep ' T _' | sed 's/.* T _//' >> libXt.def
dlltool --def libXt.def --dllname libXt.dll.a --output-lib libXt.a

This did not help at all!!  I still get the same error.

I assume I will run into the same error when ld gets to the -lX11 parm,
since the same type of files exist for it in /usr/X11R6/lib/
libX11-6.dll.a
libX11.dll.a -> libX11-6.dll.a

One last thing, what are the -lm options in the gcc command invocation?
It isn't a library named libm.a right?  I can't find any other reference
to such an option for ld anywhere.

Anyway, can anyone give me some pointers as to where to go next?

Thanks 
Lou



More information about the Cygwin-xfree mailing list