mongo-cxx-driver

Mongodb Cxx Driver Test crashing in Release Build [ Works fine in Debug ]

对着背影说爱祢 提交于 2020-01-17 07:25:11
问题 I have build the mongodb cxx binaries in windows following the steps described here. I have created the Test application as mentioned in the steps. On release builds , the application throws bad allocation exception: std::bad_alloc at memory location 0x0047EB60 ] in this line : mongocxx::uri muri{ uri_string }; The same code works with Debug build. Could someone please help me to fix the issue in Release build ? 回答1: My issue got resolved after I built mongocxx and bsoncxx in Release and used

Error while loading shared libraries: libbsoncxx.so._noabi: cannot open shared object file: No such file or directory

限于喜欢 提交于 2020-01-15 02:45:27
问题 I installed the mongocxx driver, as shown by http://mongodb.github.io/mongo-cxx-driver/mongocxx-v3/installation/ and when I test driver everything looks fine, but if change a little code I get error while loading shared libraries: libbsoncxx.so._noabi: cannot open shared object file: No such file or directory . Code: CMakeLists.txt cmake_minimum_required(VERSION 3.10) if(POLICY CMP0025) cmake_policy(SET CMP0025 NEW) endif() project(test_mongodb LANGUAGES C CXX) if(NOT DEFINED CMAKE_CXX

Linking errors when building c++ project using mongo-cxx-driver

无人久伴 提交于 2020-01-15 01:53:46
问题 I am currently developing a C++ application which requires the use of the mongo-cxx-driver for accessing a MongoDB instance. I attempted a couple of methods of installation, and am met with the same linker issues each time. Initially, I attempted to install mongo-cxx-drivers and mongod-c-driver as detailed here: https://mongodb.github.io/mongo-cxx-driver/mongocxx-v3/installation/ Using the following portion of my CMake configuration, I was able to get auto-completion working and my IDE to

Linking errors when building c++ project using mongo-cxx-driver

回眸只為那壹抹淺笑 提交于 2020-01-15 01:53:07
问题 I am currently developing a C++ application which requires the use of the mongo-cxx-driver for accessing a MongoDB instance. I attempted a couple of methods of installation, and am met with the same linker issues each time. Initially, I attempted to install mongo-cxx-drivers and mongod-c-driver as detailed here: https://mongodb.github.io/mongo-cxx-driver/mongocxx-v3/installation/ Using the following portion of my CMake configuration, I was able to get auto-completion working and my IDE to

ambiguous << operator in Mongodb C++ driver document builder

前提是你 提交于 2020-01-07 04:58:08
问题 I am trying to build a mongodb document using the v3 driver. I am using strings from an array of "char *" pointers but I keep getting an error that says the << operator is ambiguous. The exact error is: item.cpp:105: error: ambiguous overload for ‘operator<<’ (operand types are ‘std::enable_if<true, bsoncxx::v_noabi::builder::stream::key_context<> >::type {aka bsoncxx::v_noabi::builder::stream::key_context<>}’ and ‘const char*’) << dbTypeString[dbType::IT_TYPE] dbTypeString is an array of

Mongocxx fails to connect to mongoDB with SSL

别等时光非礼了梦想. 提交于 2020-01-04 13:09:42
问题 I completed the following tutorial (https://medium.com/@rajanmaharjan/secure-your-mongodb-connections-ssl-tls-92e2addb3c89) to set up self-signed SSL certificates to secure communications between a device and a server hosting a mongoDB database. I can access the database from the server and from the device with the following command: mongo --ssl --sslCAFile /path/to/CA.pem --sslPEMKeyFile /path/to/mongodb.pem --host IP:port Error When I try to connect to the database with a C++ program, I get

C++ executable keep looking for ordinal entry point

烈酒焚心 提交于 2019-12-25 08:38:51
问题 I have a C++ application with the below source code: #include <cstdint> #include <iostream> #include <vector> #include <bsoncxx/json.hpp> #include <mongocxx/client.hpp> #include <mongocxx/stdx.hpp> #include <mongocxx/uri.hpp> #include <mongocxx/client.hpp> #include <mongocxx/instance.hpp> using bsoncxx::builder::stream::close_array; using bsoncxx::builder::stream::close_document; using bsoncxx::builder::stream::document; using bsoncxx::builder::stream::finalize; using bsoncxx::builder::stream

static linking mongocxx missing sasl

纵然是瞬间 提交于 2019-12-24 20:29:32
问题 I am trying to build a simple mongocxx application and I am having linking errors: -- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.8") -- Configuring done -- Generating done -- Build files have been written to: /code/build [ 50%] Linking CXX executable test_new_mongo ../mongo_cxx_driver/lib/libmongoc-static-1.0.a(mongoc-client.c.o): In function `_mongoc_get_rr_search': mongoc-client.c:(.text+0xa1): undefined reference to `__res_nsearch' mongoc-client.c:(.text+0xbd):

mongo-cxx-driver library builds but persistent linking and debug issues

牧云@^-^@ 提交于 2019-12-24 07:38:09
问题 I'm trying to build the mongo-cxx-driver for use with Cinder on Windows 10 with Visual Studio 2015. Cinder uses Boost 1.58, so I built the driver against their included version of Boost. I tried to follow the instructions exactly as described on github, but the final libs and dlls I get seem to have an issue with them. I'd love some help debugging where my compilation went wrong! Here's what I did, mirroring the official instructions here Step 1 I followed the instuctions here for installing

How to set up project with mongodb-cxx-driver in Visual Studio

*爱你&永不变心* 提交于 2019-12-24 00:39:47
问题 I have successfully built the new libmongo-cxx-driver on Windows with Visual Studio, but I fail understanding how I can set up a project in VS 2015 to link to it. I would appreciate some help on that. 回答1: Vcpkg helps you get C and C++ libraries on Windows. if someone still finding a solution by 2017. here is the new way of compiling libraries Download vcpkg follow the instructions as mentioned on git. https://github.com/Microsoft/vcpkg Step 1 C:\vcpkg>.\vcpkg search mongodb you will see