【问题标题】:Static linking SSL with Poco静态链接 SSL 与 Poco
【发布时间】:2016-05-30 14:52:14
【问题描述】:

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

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

libeay32MTd.lib(e_capi.obj) : 错误 LNK2019: unresolved external 函数 capi_open_store 中引用的符号 __imp_CertOpenStore 8>libeay32MTd.lib(e_capi.obj):错误 LNK2019:未解决的外部 函数 capi_find_key 中引用的符号 __imp_CertCloseStore 8>libeay32MTd.lib(e_capi.obj):错误 LNK2019:未解决的外部 函数中引用的符号 __imp_CertEnumCertificatesInStore capi_find_cert 8>libeay32MTd.lib(e_capi.obj):错误 LNK2019: 引用了未解析的外部符号 __imp_CertFindCertificateInStore 在函数 capi_find_cert 8>libeay32MTd.lib(e_capi.obj) 中:错误 LNK2019:未解析的外部符号 __imp_CertDuplicateCertificateContext 在函数 capi_load_ssl_client_cert 8>libeay32MTd.lib(e_capi.obj) 中引用:错误 LNK2019:未解析的外部符号 __imp_CertFreeCertificateContext 在函数 capi_find_key 8>libeay32MTd.lib(e_capi.obj) 中引用: 错误 LNK2019:未解析的外部符号 __imp_CertGetCertificateContextProperty 在函数 capi_cert_get_fname 中引用

【问题讨论】:

    标签: c++ ssl linker poco


    【解决方案1】:

    你需要链接crypt32.lib

    【讨论】:

    • 这是正确的。额外说明:crypt32.lib 是 Windows 内置库,所以如果您在构建 OpenSSL 的编译结果中没有看到它,请不要担心(就像我一样!)。
    猜你喜欢
    • 1970-01-01
    • 2010-12-31
    • 1970-01-01
    • 1970-01-01
    • 2013-03-20
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多