title: ld cannot find library even when ldconfig does
body: <p>There are several variations of this problem reported here and as far as I understand the responses, it boils down to the following causes:</p>
  
  <ul>
  <li>the software or its developer package is not installed</li>
  <li>ldconfig not knowing about the libraries</li>
  <li>missing compiler options that tell where to search the library</li>
  <li>wrong library names or missing soft links (libfoo.so -> libfoo.so.5)</li>
  </ul>
  
  <p>Now I've got:</p>
  
  <pre><code>/usr/bin/ld: cannot find -lboost_regex
  </code></pre>
  
  <p>But ldconfig knows about it:</p>
  
  <pre><code>$ ldconfig -p | grep boost_regex.so
      libboost_regex.so.5 (libc6,x86-64) =&gt; /usr/lib64/libboost_regex.so.5
      libboost_regex.so (libc6,x86-64) =&gt; /usr/lib64/libboost_regex.so
  </code></pre>
  
  <p>and it also exists:</p>
  
  <pre><code>$ ls -l /usr/lib64/libboost_regex.so
  lrwxrwxrwx 1 root root 19 Sep 24 08:19 /usr/lib64/libboost_regex.so -&gt; libboost_regex.so.5
  $ ll /usr/lib64/libboost_regex.so.5
  -rwxr-xr-x 1 root root 1000224 Apr  2 09:48 /usr/lib64/libboost_regex.so.5
  </code></pre>
  
  <p>Any ideas or hints what I'm missing?</p>
  
  <p>Regards,
  Andi</p>