我正在使用这个http://mongocxx.org/在 Windows 上安装 mongo DB C++ 驱动程序。我的目标是使用 C++ 在 Qt Creator 上编写 mongo dB 代码。所以我是初学者,所以上面链接中给出的步骤没有详细说明。如果有人以前这样做过,请用简单的方式描述...
编辑:我试图使用链接http://mongoc.org/libmongoc/current/installing.html中显示的 mingw64 构建驱动程序文件,但 显示错误。
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