mongo-cxx-driver

C++ driver library for MongoDB database connectivity

brewmacoslinux
Try with needOr install directly
Source

About

C++ driver for MongoDB

Commands

mongo-cxx-driver

Examples

Link mongo-cxx-driver in CMake project$ find_package(mongocxx REQUIRED)
Include header for MongoDB operations$ #include <mongocxx/client.hpp>
Connect to MongoDB and insert document$ mongocxx::client client{mongocxx::uri{}}; auto collection = client["db"]["collection"]; collection.insert_one(document{});