Can't build project using mongodb c++ driver with MSVC -


i'm trying build following sample c++ code visual studio:

#include <iostream>  #include <bsoncxx/builder/stream/document.hpp> #include <bsoncxx/json.hpp>  #include <mongocxx/client.hpp> #include <mongocxx/instance.hpp>  int main(int, char**) {     mongocxx::instance inst{};     mongocxx::client conn{mongocxx::uri{}};      bsoncxx::builder::stream::document document{};      auto collection = conn["testdb"]["testcollection"];     document << "hello" << "world";      collection.insert_one(document.view());     auto cursor = collection.find({});      (auto&& doc : cursor) {         std::cout << bsoncxx::to_json(doc) << std::endl;     } } 

i'm not getting errors code, during building i'm getting following errors: enter image description here

enter image description here

i've built the driver according this: https://github.com/mongodb/mongo-cxx-driver/blob/master/appveyor.yml

system info: -win10 -visual studio community 2015 update 3 -using boost 1.60.0 64-bit -using cmake 3.7.0 -using git 2.10.2

also, have added following include libraries project: -bsoncxx -mongocxx -libmongoc -libbson -boost , following linker libraries: -boost 64-bit lib -mongo driver libraries

if tell me what's wrong build appreciated.

got rid of chrono , ratio errors adding " __stdc_limit_macros " line project properties\c/c++\preprocessor\preprocessor definitions. (thanks @xdg help)

for other mongocxx errors, problems were: 1. trying build 32-bit project using 64-bit boost libraries -got fixed creating new 64-bit project 2. had include bsoncxx.lib , mongocxx.lib files in project properties\linker\input\additional dependencies

after these steps project build successful, got errors during runtime because bsoncxx, mongocxx, libmongoc-1.0 , libbson-1.0 dlls missing, got fixed copying above mentioned dlls project release folder.


Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -