一、环境和编译包说明:
1、mongodb driver说明网址http://mongocxx.org/;
2、mongc-driver为:mongo-c-driver-1.17.3.tar.gz
3、mongcxx-driver为:mongo-cxx-driver-r3.6.2.tar.gz
4、boost库为(非必须,vs2017编译时需用到,其余暂无用到):boost_1_74_0.7z,路径为:https://www.boost.org/users/download/
5、cmake下载路径为:https://github.com/Kitware/CMake/releases或者https://cmake.org/files/
二、windows vs2017编译,参考博文:https://blog.csdn.net/sqcfj/article/details/86716831,后续linux-ubuntu和linux-centos本人会详细讲解。
三、补充:也可以是使用vcpkg来编译安装mongodb 的driver,在windows的power shell中具体指令如下:
> git clone https://github.com/Microsoft/vcpkg.git
> cd vcpkg
> .\bootstrap-vcpkg.bat
# Then, to hook up user-wide integration, run (note: requires admin on first use)
> .\vcpkg integrate install
> .\vcpkg install mongo-cxx-driver