title: Cannot find boost library
body: <p>This is a very basic question, I only post because I've spent already some time into it. This is what I've done so far:</p>
  
  <ol>
  <li><p>Downloaded and compiled the boost library:</p>
  
  <p><code>sudo ./bootstrap.sh</code> and <code>sudo ./bjam install</code></p>
  
  <p>This way it was installed into <code>/usr/local/lib</code>.</p></li>
  <li><p>In my source code I've added only:</p>
  
  <blockquote>
  <pre><code>#include &lt;boost/asio.hpp&gt;
  using boost::asio::ip::tcp
  </code></pre>
  </blockquote></li>
  <li><p>I compile it with:</p>
  
  <p><code>g++ -I/usr/lib/jvm/java-6-openjdk/include -L/usr/local/lib -fPIC  -lboost_system -shared -o libagent.so agent.cpp</code></p></li>
  <li><p>However, <code>ldd -d ./libagent.so</code> gives me:</p>
  
  <p><code>libboost_system.so.1.46.1 =&gt; not found</code></p></li>
  <li><p>But there is no error thrown, when using the <code>-lboost_system</code> and <code>ls /usr/local/lib</code> gets me among other things:</p>
  
  <p><code>libboost_system.so</code><br>
  <code>libboost_system.a</code></p></li>
  </ol>
  
  <p>What am I missing?</p>