Hello,
Just started working with MongoDB.
I have compiled C++ driver using cxx-driver-r3.0.2, mongo-c-driver-1.4.2 and boost_1_62_0.
My environment: Windows 10 Pro, Visual Studio 2015 Pro. The driver is compiled for the x64 platform w/o any issues.
But I can't even connect to the database, it crashes on the second statement here (in bold):
mongocxx::uri uri("mongodb://myserver:27017");
mongocxx::client client(uri);
Here is the call stack:
libmongoc-1.0.dll!mongoc_counter_clients_active_add(__int64 val) Line 42 C
libmongoc-1.0.dll!mongoc_counter_clients_active_inc() Line 42 C
libmongoc-1.0.dll!_mongoc_client_new_from_uri(const _mongoc_uri_t * uri, _mongoc_topology_t * topology) Line 776 C
libmongoc-1.0.dll!mongoc_client_new_from_uri(const _mongoc_uri_t * uri) Line 700 C
mongocxx.dll!00007ffda5e10aa4() Unknown
MyMongo.exe!main(int argc, char * * argv) Line 32 C++
[External Code]
The exact line of code where the exception is thrown (mongoc-counters.defs):
COUNTER(clients_active, "Clients", "Active", "The number of active clients.")
Any idea how to resolve this?
Thanks,
Alex