malis@star-trek.bbn.com (Andy Malis) (05/30/91)
When I use "xmkmf" to build a Makefile for an X application, the resulting Makefile works fine until it comes time for the final link. At that time, the location of the libraries (/usr/local/X11R4/sun3/lib/gnu) is not included on the linking command line, and I end up having to add a -L switch by hand. For example, I am building "unclutter" (thank you, Mark), and the Makefile executes the following command for the final link: gcc -DNOSTDHDRS -fstrength-reduce -fpcc-struct-return \ -fwritable-strings -traditional -o unclutter unclutter.o -O -lXext -lX11 The linker can't find libXext.a and libX11.a, because there is no -L switch in the command line. I checked the Imake site.def file, and found the following lines: #ifndef LibDir #define LibDir /usr/local/X11R4/sun3/lib #endif #ifndef UsrLibDir #define UsrLibDir /usr/local/X11R4/sun3/lib/gnu #endif Is there anything else that needs to be added to the site file? Thanks. Andy Malis <malis@bbn.com> UUCP: {harvard,rutgers,uunet}!bbn!malis