问题描述
我正在尝试从 此链接 关于此链接中的描述.我已经成功编译了 libbson,当我尝试执行以下命令时,我得到 源目录/"似乎不包含 CMakeLists.txt.
I'am trying to compile mongo-c-driver from this link regarding to described in this link.I have compiled libbson successfulty, when i try to below command I get The source directory "/" does not appear to contain CMakeLists.txt.
cmake -G "Visual Studio 14 2015 Win64" \ "-DCMAKE_INSTALL_PREFIX=C:\mongo-c-driver" \ "-DBSON_ROOT_DIR=C:\mongo-c-driver"
推荐答案
使用 vcpkg.按照 git 上提到的说明进行操作https://github.com/Microsoft/vcpkg
Use vcpkg.follow instruction as mentioned on git https://github.com/Microsoft/vcpkg
第一步
C:\vcpkg>.\vcpkg 搜索 mongodb
C:\vcpkg>.\vcpkg search mongodb
步骤 2
C:\vcpkg>.\vcpkg 安装 mongo-c-driver
C:\vcpkg>.\vcpkg install mongo-c-driver
第三步
vcpkg 集成安装
然后简单地使用visual studio来包含.vcpkg 很聪明,它会为您完成所有后台工作.
then simply use visual studio to include. vcpkg is smart it will do all background jobs for you.
您可能对此感兴趣.如何构建程序使用mongodb的c++驱动?
这篇关于编译 mongo-c-driver的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!