#include
#include
#include
#include <bsoncxx/builder/basic/document.hpp>
#include <bsoncxx/json.hpp>
#include <mongocxx/client.hpp>
#include <mongocxx/instance.hpp>
#include <mongocxx/uri.hpp>
using bsoncxx::builder::basic::kvp;
using bsoncxx::builder::basic::make_document;
int main() {
mongocxx::instance instance;
mongocxx::uri uri(“”);
mongocxx::client client(uri);
auto db = client[“sample_mflix”];
auto collection = db[“movies”];
auto result = collection.find_one(make_document(kvp("title", "The Shawshank Redemption")));
std::cout << bsoncxx::to_json(*result) << std::endl;
}
After trying to build the project in visual studio I am getting the below mentioned error
unresolved external symbol “__declspec(dllimport) public: __cdecl bsoncxx::v_noabi::document::view::view(unsigned char const *,unsigned __int64)” (_imp??0view@document@v_noabi@bsoncxx@@QEAA@PEBE_K@Z) referenced in function "public: class bsoncxx::v_noabi::document::view __cdecl bsoncxx::v_noabi::document::value::view(void)const " (?view@value@document@v_noabi@bsoncxx@@QEBA?AV0234@XZ)
I am not able to find out the reason why i am facing this issue.
Kindly help me resolve this.