MongoDB C++ 开发环境搭建

本文详细介绍了在Linux系统中如何编译安装MongoDB的C++驱动,包括GCC、CMake等依赖库的准备,MongoDB C Driver和C++ driver的编译步骤,以及添加必要的环境变量。最后,提及了后续可以参考的实例代码和官方快速入门指南。
摘要由CSDN通过智能技术生成

编译使用C++ MongoDB Driver

本博客在linux下编译使用C++ MongoDB Driver


准备工作

  • GCC 4.8.2+
  • CMake 3.2+
  • The MongoDB C driver version 1.3.5+
  • boost 1.56+

编译安装MongoDB C Driver

The C++ driver uses libbson and the MongoDB C driver internally.
安装c++driver前需要先安装libbson 和 c driver:

$ sudo apt-get install pkg-config libssl-dev libsasl2-dev

wget https://github.com/mongodb/mongo-c-driver/releases/download/1.3.5/mongo-c-driver-1.3.5.tar.gz

$ tar xzf mongo-c-driver-1.3.5.tar.gz

$cd mongo-c-driver-1.3.5/

$ ./configure

如果都配置正确的话机会看到:

libmongoc was configured with the following options:
Build

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值