使用 SSL 构建 Mongo Cpp driver 并在 Windows 上预构建 Boost
Build Mongo Cpp driver with SSL and prebuild Boost on Windows
我在使用 Windows 上的 --SSL 选项构建 Mongo 旧 Cpp driver 时遇到问题。
问题是我使用的是 prebuild 版本的 Boost 库,因此在 mongo driver 构建文档页面 I 中有详细说明必须使用 --libpath 和 --cpppath 选项指向 boost 库和 headers 而不是 --extrapath 选项.
Due to the layout of the boost installation in the pre-built binaries,
you cannot use the --extrapath SCons flag to inform the build of the
installation path for the boost binaries. Instead, you should use the
--cpppath flag to point to the root of the chosen boost installation path, and --libpath to point into the appropriately named library
subdirectory of the boost installation.
但我还需要 --libpath 和 --cpppath 来指向 OpenSSL 库。
我试过:
用“;”组合路径例如。 --libpath="c:\boost-path\lib;c:\openssl-path\lib"
指定--libpath和--cpppath两次,各有一个
路径
- 设置环境变量LIBPATH和CPPPATH
None 似乎可以工作,具体取决于先发生什么 我收到有关未找到 Boost 或未找到 SSL 的构建警告。
如何指定两者?
旧版驱动程序构建系统支持多种形式的库设置和包含搜索路径。您要在此处使用的是 LIBPATH
和 CPPPATH
Scons 变量,它们在 after 调用 SCons 时设置。多个参数在带引号的字符串中用空格分隔。请尝试以下操作:
scons --ssl CPPPATH="c:\boost-path\include c:\openssl-path\include" LIBPATH="c:\boost-path\lib c:\openssl-path\lib"
我在使用 Windows 上的 --SSL 选项构建 Mongo 旧 Cpp driver 时遇到问题。
问题是我使用的是 prebuild 版本的 Boost 库,因此在 mongo driver 构建文档页面 I 中有详细说明必须使用 --libpath 和 --cpppath 选项指向 boost 库和 headers 而不是 --extrapath 选项.
Due to the layout of the boost installation in the pre-built binaries, you cannot use the --extrapath SCons flag to inform the build of the installation path for the boost binaries. Instead, you should use the --cpppath flag to point to the root of the chosen boost installation path, and --libpath to point into the appropriately named library subdirectory of the boost installation.
但我还需要 --libpath 和 --cpppath 来指向 OpenSSL 库。 我试过:
用“;”组合路径例如。 --libpath="c:\boost-path\lib;c:\openssl-path\lib"
指定--libpath和--cpppath两次,各有一个 路径
- 设置环境变量LIBPATH和CPPPATH
None 似乎可以工作,具体取决于先发生什么 我收到有关未找到 Boost 或未找到 SSL 的构建警告。
如何指定两者?
旧版驱动程序构建系统支持多种形式的库设置和包含搜索路径。您要在此处使用的是 LIBPATH
和 CPPPATH
Scons 变量,它们在 after 调用 SCons 时设置。多个参数在带引号的字符串中用空格分隔。请尝试以下操作:
scons --ssl CPPPATH="c:\boost-path\include c:\openssl-path\include" LIBPATH="c:\boost-path\lib c:\openssl-path\lib"