I am trying to compile a program, and the linking fails with the following message:
gcc -O2 -pipe -Wl,--export-dynamic tkAppInit.o -L/home/dimitriv/ns-allinone-2.35/tk8.5.10/unix -ltk8.5 \
-L/home/dimitriv/ns-allinone-2.35/tcl8.5.10/unix -ltcl8.5 -lX11 -ldl -lieee -lm -Wl,-rpath,/home/dimitriv/ns-allinone-2.35/lib -o wish /usr/bin/ld: cannot find -lX11
collect2: error: ld returned 1 exit status
however, my $LD_LIBRARY_PATH
contains the directory where X11 has been installed:
echo $LD_LIBRARY_PATH
/share/apps/cim/lib:/opt/ns2/otcl-1.13:/opt/ns2/lib:/home/dimitriv/local/lib:
and the libraries seem to be correctly installed.
ls /home/dimitriv/local/lib | grep X11
libX11.a
libX11.la
libX11.so
libX11.so.6
libX11.so.6.3.0
libX11-xcb.a
libX11-xcb.la
libX11-xcb.so
libX11-xcb.so.1
libX11-xcb.so.1.0.0
X11
Why can't make locate the libraries and do the linking?