我试图构建mongo-cxx驱动程序(最终),第一步是构建mongo-c-driver(它需要libbson)。mongo-c-driver找不到libbson
我正在运行Windows 10并使用Visual Studio 2015作为我的编译器。我能够运行CMake并构建libbson,所有构建的项目都很好。现在我有和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
的过程中是否应该自动设置?
嗨,我的答案是解决您的问题还是您需要更多信息? –