title: How can I compile the Mongodb-c-driver program?
body: <p>I use</p>
  
  <pre><code>gcc -o mongotest mongotest.c $(pkg-config --cflags --libs libmongoc-1.0)
  </code></pre>
  
  <p>for compilation mongodb c driver code, and then</p>
  
  <pre><code>LD_LIBRARY_PATH=/usr/local/lib ./mongotest
  </code></pre>
  
  <p>for run.</p>
  
  <p>If I try without LD_LIBRARY_PATH=/usr/local/lib I have</p>
  
  <pre><code>./mongotest: error while loading shared libraries: libmongoc-1.0.so.0: cannot open shared object file: No such file or directory
  </code></pre>
  
  <p>How can I run program without LD_LIBRARY_PATH=/usr/local/lib,
  Is it correct to do so? How can I debug mongodb c driver programs? </p>