title: How to debug error "Symbol lookup error: undefined symbol"
body: <p>I created an app (api_tests) that uses a library (libstorage.so) that linked to oracle occi library (libocci.so.12.1) and compiled it. 
  When I run this app, I get an error:</p>
  
  <pre><code>api_tests
  api_tests: symbol lookup error: ./libstorage.so: undefined symbol: _ZN6oracle4occi11Environment17createEnvironmentENS1_4ModeEPvPFS3_S3_mEPFS3_S3_S3_mEPFvS3_S3_E
  </code></pre>
  
  <p>However this library with this symbol exists in the current directory:</p>
  
  <pre><code>ls | grep libocci
  libocci.so*
  libocci.so.11.1*
  libocci.so.12.1*
  
  nm libocci.so.12.1 | grep _ZN6oracle4occi11Environment17createEnvironmentENS1_4ModeEPvPFS3_S3_mEPFS3_S3_S3_mEPFvS3_S3_E
  0000000000097e70 T _ZN6oracle4occi11Environment17createEnvironmentENS1_4ModeEPvPFS3_S3_mEPFS3_S3_S3_mEPFvS3_S3_E
  0000000000125014 r _ZN6oracle4occi11Environment17createEnvironmentENS1_4ModeEPvPFS3_S3_mEPFS3_S3_S3_mEPFvS3_S3_E$$LSDA
  </code></pre>
  
  <p>The current path is added to LD_LABRARY_PATH:</p>
  
  <pre><code>echo $LD_LIBRARY_PATH
  ./:/usr/vacpp/bin/../lib:/lib
  </code></pre>
  
  <p>I'm wondering what can be wrong with my library and how I can debug the issue?</p>
  
  <p>Update: 
  It looks like this library was not linked (at least ldd doesn't show this dependency). I guess it was mistake in makefile and it was compiled but failes in runtime.</p>