Using mongocxx 3.3 or mongo cxx 3.4 stable versions, I´m trying to connect to a mongo atlas instance. This is my basic code:
#include <mongocxx/client.hpp>
#include <mongocxx/instance.hpp>
mongocxx::instance inst{};
mongocxx::uri uri = mongocxx::uri("mongodb+srv://...");
mongocxx::client conn(uri);
mongocxx::database db = conn["test"];
And I have tested several alternatives, like using client options (like explained here: http://mongocxx.org/mongocxx-v3/configuration/), and also setting a pem file path like explained here: Mongocxx fails to connect to mongoDB with SSL.
I always have the following error:
terminate called after throwing an instance of 'mongocxx::v_noabi::exception'
what(): SSL support not available
Aborted (core dumped)