Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!wuarchive!rex!ukma!hsdndev!dartvax!mars!nic!bbn.com!star-trek!malis From: malis@star-trek.bbn.com (Andy Malis) Newsgroups: comp.windows.x Subject: Problem with Imake and xmkmf Message-ID: <6783@archive.BBN.COM> Date: 30 May 91 16:14:46 GMT Sender: news@bbn.com Lines: 31 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 UUCP: {harvard,rutgers,uunet}!bbn!malis