[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: linking with -lX11 doesn't work??!!



>
>I tried to build an X program; the last line of the make was
>
>cc foo.o bar.o .... etc ...   -lX11 -lm -s
>
>However ld gave the following error:
>
>ld: cannot open -lX11: No such file or directory
>
>Here's what I have in /usr/X11R6/lib (the standard after installing
>xbase and xtnd):
>
>X11/            libX11.so.6.0*  libXaw.sa       libXmu.sa       libXt.so.6@
>libFS.a         libXExExt.a     libXaw.so.6@    libXpm.a        libXt.so.6.0*
>libICE.sa       libXIE.sa       libXaw.so.6.0*  libXpm.sa       libXtst.sa
>libSM.sa        libXIE.so.6@    libXdmcp.a      libXpm.so.4@    liblbxXext.a
>libX11.sa       libXIE.so.6.0*  libXext.sa      libXpm.so.4.6*  liboldX.a
>libX11.so.6@    libXau.a        libXi.sa        libXt.sa
>
>I had to use explicitely -L /usr/X11R6/lib -lX11 -lm -s to get the
>program linked.
>
>Did I miss something?

	No, /usr/X11R6/lib is not in the "standard" places, so you have to;
		a); set your LD_LIBRARY_PATH to /usr/X11R6/lib
or
		b); include the -L /usr/X11R6/lib

.................Bill,
==============================================================
	" Man's capacity to learn is not fixed in any ordinary
sense.  It is not fixed in terms of the responses it will
produce;  it is not fixed in terms of absolute level of
knowledge it will achieve." - Engelmann
==============================================================


Reply to: