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