title: How to install and use mongodb c++ driver in Ubuntu?
body: <p>Official <a href="https://www.mongodb.org/about/contributors/tutorial/build-mongodb-from-source/" rel="nofollow noreferrer">documentation</a> seems to lack step by step instructions for installing and usage of c++ driver. This <a href="https://stackoverflow.com/questions/12368884/how-to-install-mongodb-drivers-for-c-in-ubuntu">thread</a> and the answer seem more promissing. But still I'm not sure what I'm doing wrong, because I can not <code>$ locate client/dbclient.h</code> in <code>Ubuntu</code>, as if mongo driver was not installed. So, this is what I did:</p>
  
  <ol>
  <li>Dowloaded driver at this <a href="http://dl.mongodb.org/dl/cxx-driver" rel="nofollow noreferrer">link</a> -ok</li>
  <li>Unzipped the archive - ok</li>
  <li>installed <code>scons</code> like so <code>$ sudo apt-get install scons</code></li>
  <li>Did <code>$ scons</code> and then</li>
  <li>sudo <code>$ scons install</code></li>
  <li>opened <code>/etc/ld.so.conf</code> file and added <code>/usr/local/lib</code></li>
  </ol>
  
  <p>After all these steps I still can not locate <code>client/dbclient.h</code> in my system. It seems as if I missed something. Besides, when I get to the stage when the library gets installed, I want to read the core of the library, because in tiny tutorials on the Web I can not find everything I want (I guess because of the lack of full-fledged tutorials similar to those of <code>Python</code>). So, can you also, please, advise what library files I should look at to learn the api of functions, that I will be using?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>And this official <a href="https://mongodb-documentation.readthedocs.org/en/latest/ecosystem/tutorial/getting-started-with-cpp-driver.html" rel="nofollow noreferrer">link</a> seems to be outdated, because <code>$ scons --full install</code> results in error message <code>No such option: --full</code>. The lack of tutorials, outdated documentation and rather steep learning curve, IMHO, make usage of c++ rather problematic.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Well, it seems like this <a href="https://mongodb-documentation.readthedocs.org/en/latest/ecosystem/tutorial/getting-started-with-cpp-driver.html" rel="nofollow noreferrer">doc</a> is not just outdated, but incorrect, since it sdould be:</p>
  
  <pre><code>scons --prefix=/usr/include install.
  </code></pre>
  
  <p>However, even though I specify <code>--prefix=/usr/include</code> I can not locate any mongo files inside this folder after installation process. I face exactly the very same problem as a guy in this <a href="https://groups.google.com/forum/#!topic/mongodb-user/CsEMW_ZBVss" rel="nofollow noreferrer">thread</a>. I guess, my final question should be "Does anybody in the world use mongodb in C++?" </p>
  
  <p><strong>EDIT</strong></p>
  
  <p>If I try to do</p>
  
  <pre><code>$ sudo git clone git@github.com:mongodb/mongo-cxx-driver.git
  </code></pre>
  
  <p>Then I get <code>Could not read from remote repository</code> etc. It seems like they did everything to prevent using mongdb in c++.</p>