MongoDB CXX Driver examples Prerequisites libmongoc (see the installation guide) Building code examples Run git clone https://github.com/mongodb/mongo-cxx-driver && cd mongo-cxx-driver/build Follow the instructions here to install the driver Run make examples cd examples/mongocxx Start up mongod running on the default port (i.e. 27017) Run an example file (e.g. ./aggregate) Building project examples Install libmongoc and mongocxx following the installation instructions Change to one of the project example directories, e.g. examples/projects/cmake/mongocxx/shared Run ./build.sh