Official documentation seems to lack step by step instructions for installing and usage of c++ driver. This thread and the answer seem more promissing. But still I'm not sure what I'm doing wrong, because I can not $ locate client/dbclient.h
in Ubuntu
, as if mongo driver was not installed. So, this is what I did:
- Dowloaded driver at this link -ok
- Unzipped the archive - ok
- installed
scons
like so$ sudo apt-get install scons
- Did
$ scons
and then - sudo
$ scons install
- opened
/etc/ld.so.conf
file and added/usr/local/lib
After all these steps I still can not locate client/dbclient.h
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 Python
). So, can you also, please, advise what library files I should look at to learn the api of functions, that I will be using?
EDIT
And this official link seems to be outdated, because $ scons --full install
results in error message No such option: --full
. The lack of tutorials, outdated documentation and rather steep learning curve, IMHO, make usage of c++ rather problematic.
EDIT
Well, it seems like this doc is not just outdated, but incorrect, since it sdould be:
scons --prefix=/usr/include install.
However, even though I specify --prefix=/usr/include
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 thread. I guess, my final question should be "Does anybody in the world use mongodb in C++?"
EDIT
If I try to do
$ sudo git clone git@github.com:mongodb/mongo-cxx-driver.git
Then I get Could not read from remote repository
etc. It seems like they did everything to prevent using mongdb in c++.