darts at dialix.com.au
Tue Nov 6 16:05:11 WST 2007
Adrian Chadd wrote:
> And don't forget that by default the X11 development packages aren't
> On Tue, Nov 06, 2007, Russell wrote:
>> On 11/5/07, David Dartnall <darts at dialix.com.au> wrote:
>>> XLIBS = -L/usr/X11R6/lib -lX11
>>> XINCLUDEDIR = /usr/X11R6/include
>>> Neither path exists in Ubuntu Gutsy, and I can't find 'lX11'.
>>> What is the significance of the '-L' at the start of the XLIBS path and
>>> the '-' preceding the 'lX11'? How should this line read in Gutsy?
>> -Ldirname means "look for libraries in dirname, in addition to the
>> default set of directories". -lfoo means "link with a library called
>> libfoo.a." libfoo.a will be searched for in all the directories
>> specified with -L plus the default directories.
>> So with the XLIBS above, the linker is being told to look for
>> /usr/X11R6/lib/libX11.a, or /usr/lib/libX11.a, or /lib/libX11.a, and
>> possibly some others, using whichever it finds first.
>> To get the correct directory name, try running "locate libX11.a" and
>> using the directory name of the file that command shows you, if any.
>> Virus found in this message.
>> PLUG discussion list: plug at plug.org.au
>> Committee e-mail: committee at plug.linux.org.au
Ahhh.. so that's what it means!
locate libX11 produced the following response,
darts at localhost:~$ locate libX11.*
and once I understood the significance if the 'L..' and '-l' the
following modification to Makefile produced an error-free make and the
binary getui which I'll now move to /usr/bin.
XINCLUDEDIR = /usr/include/X11/
XLIBS = -L/usr/lib/ -lX11
and Bob's y'r uncle.
Thank you all
More information about the plug