title: Error loading shared libraries
body: <p>I'm running eclipse on Ubuntu using a g++ compiler and I'm trying to run a sample program that utilizes xerces. </p>
  
  <p>The build produced no errors however, when i attempted to run the program, I would receive this error:</p>
  
  <blockquote>
    <p><code>error while loading shared libraries: libxerces-c-3.1.so: cannot open shared object file: No such file or directory</code></p>
  </blockquote>
  
  <p><code>libxerces-c-3.1.so</code> is in the directory <code>/opt/lib</code> which I have included as a library in eclipse. The file is there when I checked the folder. When I perform an <code>echo $LD_LIBRARY_PATH</code>, <code>/opt/lib</code> is also listed. </p>
  
  <p>Any ideas into where the problem lies? Thanks. </p>
  
  <p>An <code>ldd libxerces-c-3.1.so</code> command yields the following output: </p>
  
  <pre><code>linux-vdso.so.1 =&gt;  (0x00007fffeafff000)
  libnsl.so.1 =&gt; /lib/libnsl.so.1 (0x00007fa3d2b83000)
  libpthread.so.0 =&gt; /lib/libpthread.so.0 (0x00007fa3d2966000)
  libstdc++.so.6 =&gt; /usr/lib/libstdc++.so.6 (0x00007fa3d265f000)
  libm.so.6 =&gt; /lib/libm.so.6 (0x00007fa3d23dc000)
  libc.so.6 =&gt; /lib/libc.so.6 (0x00007fa3d2059000)
  libgcc_s.so.1 =&gt; /lib/libgcc_s.so.1 (0x00007fa3d1e42000)
  /lib64/ld-linux-x86-64.so.2 (0x00007fa3d337d000)
  </code></pre>