Mongodb c ++驱动程序问题
Mongodb c++ driver issue
我收到一个错误,说命名空间"bsoncxx::v_noabi::builder::basic"没有成员"make_document",我已经按照教程中提到添加了必需的包含。
我正在使用mongo-cxx-driver-r3.1.1版本。我从这里开始效仿
这是我尝试过的
#include "maxi.h"
#include <cstdlib>
#include <iostream>
#include <bsoncxx/builder/basic/array.hpp>
#include <bsoncxx/builder/basic/document.hpp>
#include <bsoncxx/builder/basic/kvp.hpp>
#include <mongocxx/client.hpp>
#include <mongocxx/instance.hpp>
using bsoncxx::builder::basic::kvp;
using bsoncxx::builder::basic::make_document;// here is error
using bsoncxx::type;
mongocxx::instance inst{};
mongocxx::client conn{ mongocxx::uri{ "mongodb://localhost:27017" } };
见图片
这里我已经在编译后测试了MongoDB驱动程序,并且它运行良好。出于某种原因,我需要使用make_document选项来实现我的目标。不确定是否可能 bsoncxx::builder::basic::make_document;选项可能已被删除或替换为我不知道的其他内容。
在当前的主分支中,document.hpp 文件包含make_document方法。如果我没记错的话,您使用的是稳定的发布版本。
看看这里。在MongoDB c ++驱动程序中使用声明"未找到"
相关文章:
- Mongodb c++驱动程序:如何查询元素的数组
- C++ Windows 驱动程序MSB3030无法复制该文件,因为它找不到
- 使用mongocxx驱动程序时包含头文件问题
- void*到驱动程序中的UnicodeString
- C++驱动程序看不到头文件
- 用于创建/注册虚拟存储设备的 IOKit 驱动程序
- 员工测试驱动程序数据结构
- 获取 OID(类型::b_oid)作为 MongoDB C++驱动程序中的字符串
- 如何在 c++ 中映射驱动程序?
- 如何在 cuda 中将 kd 树从主机复制到驱动程序
- Visual Studio 如何在内核模式驱动程序项目中使用C++标准库?
- 为什么我的驱动程序只读取部分字符串?
- 为 Sql 服务器实现 odbc 包装器.将数据库数据读取为字符或要求驱动程序将数据转换为 C 类型
- 如何在C++中将OID_PM_WOL_PATTERN_LIST发送到NDIS驱动程序?
- 设备驱动程序内存缓冲区处理器缓存问题
- Mongodb c ++驱动程序问题
- C++ Mongocxx驱动程序存储的JavaScript问题
- 问题:Windows 10:QMYSQL驱动程序未加载
- 部署时QT SQLITE问题:未加载驱动程序
- 鼠标过滤器驱动程序的问题