Thanks, I will try that. Is there any way to determine what the default search libs are for gcc/ld? I was not able to find anything in the man/info pages other than there was a default search path.
Lou * Harold L Hunt II <[EMAIL PROTECTED]> [2003-10-22 18:07]: > You should have a -L/usr/X11R6/lib before the X libs, this tells gcc to > look in /usr/X11R6/lib. > > I don't know enough about sam to tell you how to get that into the link > line automatically, but you should be able to figure it out. > > Harold > > Lou Losee wrote: > > >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 > >
