我正在尝试使用需要 OpenSSL 的静态链接 Poco 库构建 dll。
当我使用 libeay32MDd.lib 和 ssleay32MDd.lib 静态链接构建 Poco 库时,它运行良好但需要 OpenSSL 的 DLL。如果我使用 libeay32MTd.lib 和 ssleay32MTd.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/