【发布时间】:2016-07-28 19:16:04
【问题描述】:
我正在尝试构建 mongo-cxx-driver(最终),第一步是构建 mongo-c-driver(需要 libbson)。
我正在运行 Windows 10 并使用 Visual Studio 2015 作为我的编译器。我能够很好地运行 CMake 并构建 libbson,所有构建的项目都很好。现在我在mongo-c-driver/src/libbson/build/Debug/ 和mongo-c-driver/src/libbson/build/Release/ 中有bson-static-1.0.lib 的副本。这似乎一切都是正确的。
下一步是构建 mongo-c-driver。我运行 CMake 并尝试创建 Visual Studio 解决方案,但出现错误:
Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_LIBRARIES OPENSSL_INCLUDE_DIR)
Searching for sasl/sasl.h
Not found (specify -DCMAKE_INCLUDE_PATH=C:/path/to/sasl/include for SASL support)
Searching for libsasl2
Not found (specify -DCMAKE_LIBRARY_PATH=C:/path/to/sasl/lib for SASL support)
Current version (from VERSION_CURRENT file): 1.3.5
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
BSON (ADVANCED)
linked by target "mongoc_shared" in directory C:/Users/sdf/Downloads/mongo-c-driver-1.3.5
linked by target "mongoc_static" in directory C:/Users/sdf/Downloads/mongo-c-driver-1.3.5
Configuring incomplete, errors occurred!
See also "C:/Users/sdf/Downloads/mongo-c-driver-1.3.5/build/CMakeFiles/CMakeOutput.log".
看起来变量BSON 的值没有设置正确——它现在的值是BSON-NOTFOUND。有谁知道BSON 的正确值是什么,以及它是否应该在编译libbson 的过程中自动设置?
【问题讨论】:
标签: mongodb bson mongo-c-driver mongo-cxx-driver