Mongo Windows 中的 dB c++ 驱动程序安装问题

Mongo dB c++ driver installation issues in Windows

我正在使用这个 http://mongocxx.org/ 在 windows 上安装 mongo DB C++ 驱动程序。我的目标是使用 C++ 在 Qt Creator 上编写 mongo dB 代码。所以我是初学者,所以上面给出的步骤 link 没有详细说明。如果以前有人这样做过,请简单描述一下...

编辑: 我正在尝试使用 linkhttp://mongoc.org/libmongoc/current/installing.html 中显示的 mingw64 构建驱动程序文件 thi shows error .

LD-RD2@LD-RD2 MINGW64 ~/mongo-c-driver-1.18.0/cmake-build
# cmake -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF ..
CMake Error: CMake was unable to find a build program corresponding to "Ninja".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
See also "C:/Users/LD-RD2/AppData/Roaming/SPB_Data/mongo-c-driver-1.18.0/cmake-build/CMakeFiles/CMakeOutput.log".

更新:错误

LD-RD2@LD-RD2 MINGW64 ~/mongo-cxx-driver-r3.6.5/build2
# ‘C:\Program Files\CMake\bin\cmake.exe’ … \
-G "MSYS Makefiles"           \
-DCMAKE_PREFIX_PATH=C:\Program Files (x86)\mongo-c-driver       \
-DCMAKE_INSTALL_PREFIX=C:\mongo-cxx-driver ..
-bash: syntax error near unexpected token `('
-bash: -DCMAKE_INSTALL_PREFIX=C:mongo-cxx-driver: command not found

LD-RD2@LD-RD2 MINGW64 ~/mongo-cxx-driver-r3.6.5/build2
# cmake -G "MSYS Makefiles"           \
-DCMAKE_PREFIX_PATH=C:\Program Files (x86)\mongo-c-driver       \
-DCMAKE_INSTALL_PREFIX=C:\mongo-cxx-driver ..
-bash: syntax error near unexpected token `('
-bash: -DCMAKE_INSTALL_PREFIX=C:mongo-cxx-driver: command not found

您可以通过以下方式告诉 CMake 生成标准 makefile:

cmake -G "Unix Makefiles" -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF ..

或者,您可以只安装 Ninja(并使其在您的 $PATH 中可用),这是 CMake 目标的更好选择。

检查 cmake --help 以查看可用的生成器,您可能需要改用“MSYS Makefiles”生成器。