c++ - 静态链接 SSL 与 Poco

标签 c++ ssl linker poco

我正在尝试使用需要 OpenSSL 的静态链接 Poco 库构建 dll。

当我使用 libeay32MDd.libssleay32MDd.lib 静态链接构建 Poco 库时,它运行良好但需要 OpenSSL 的 DLL。如果我使用 libeay32MTd.libssleay32MTd.lib,它会抛出以下错误:

libeay32MTd.lib(e_capi.obj) : error LNK2019: unresolved external symbol __imp_CertOpenStore referenced in function capi_open_store 8>libeay32MTd.lib(e_capi.obj) : error LNK2019: unresolved external symbol __imp_CertCloseStore referenced in function capi_find_key 8>libeay32MTd.lib(e_capi.obj) : error LNK2019: unresolved external symbol __imp_CertEnumCertificatesInStore referenced in function capi_find_cert 8>libeay32MTd.lib(e_capi.obj) : error LNK2019: unresolved external symbol __imp_CertFindCertificateInStore referenced in function capi_find_cert 8>libeay32MTd.lib(e_capi.obj) : error LNK2019: unresolved external symbol __imp_CertDuplicateCertificateContext referenced in function capi_load_ssl_client_cert 8>libeay32MTd.lib(e_capi.obj) : error LNK2019: unresolved external symbol __imp_CertFreeCertificateContext referenced in function capi_find_key 8>libeay32MTd.lib(e_capi.obj) : error LNK2019: unresolved external symbol __imp_CertGetCertificateContextProperty referenced in function capi_cert_get_fname

最佳答案

你需要链接到crypt32.lib

关于c++ - 静态链接 SSL 与 Poco,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37528573/

相关文章:

IIS 在响应 header 中返回错误代码 403 并且没有错误页面

c++ - ARM vector 表指向后一个字节

c++ - 有没有办法在调用之前检查函数签名?

Perl 网络服务(服务器)最佳实践

c++ - 如何在类图中显示单例关系

java - OkHttp SSL证书

gcc - GCC 选项 "-Wl,OPTION"中的 OPTION 是什么?

c++ - 如何使链接器不排除未调用的函数?

java - Windows C++ 相当于 Java 的 LockSupport.parkNanos()

c++ - 如何从 Rust 调用 C++ Arduino 库?