Complete tool chain for developers on Windows:

  • Ubuntu Linux Subsystem on Windows 10 (recommended): Initially is Ubuntu 14.04 (Trusty)
  • Cygwin (for Windows before Windows 10)
  • Virtual Linux Machine (CentOS, Ubuntu,…)

GCC 6 and G++ 6 on Ubuntu 14 (Trusty):

$ sudo add-apt-repository ppa:ubuntu-toolchain-r/test
$ sudo apt-get update
$ sudo apt-get install gcc-6
$ sudo apt-get install g++-6

Default version of Boost C++ Library on Ubuntu 14 (Trusty) is 1.54:

$ sudo apt-get install libboost-all-dev

Library required by MongoDB C Driver, libbson:

$ sudo apt-get install git-core automake autoconf libtool gcc
$ git clone git://
$ cd libbson/
$ git checkout x.y.z #version
$ ./
$ make
$ sudo make install

Libraries and C/C++ headers should be in these directories of subdirectories, these headers and binaries are used for compiling and linking:


MongoDB C Driver:

$ sudo apt-get install pkg-config libssl-dev libsasl2-dev
$ git clone
$ cd mongo-c-driver
$ git checkout x.y.z #version
$ ./ --with-libbson=bundled
$ make
$ sudo make install

MongDB C++ Driver:

$ curl -OL
$ tar -xzf r3.0.2.tar.gz
$ cd mongo-cxx-driver-r3.0.2/build
$ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local ..
$ make
$ sudo make install