【问题标题】:OpenSSL NMAKE Unresolved External SymbolOpenSSL NMAKE 未解析的外部符号
【发布时间】:2020-03-03 16:25:18
【问题描述】:

我正在尝试编译一个非常轻量级的 OpenSSL 版本,并禁用了许多功能。

使用Build openssl with just RSA and AES的帖子我已经成功运行了构建步骤,但是运行nmake时出现问题。

第一次运行几分钟后失败。现在,当我运行 nmake 时,它​​以同样的方式失败,没有所有以前的文本。输出如下所示。

D:\xxxxxxxx\openssl-master>nmake

Microsoft (R) Program Maintenance Utility Version 14.23.28106.4
Copyright (C) Microsoft Corporation.  All rights reserved.

        "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\bin\HostX64\x64\nmake.exe" /                   depend && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\bin\HostX64\x64\nmake.exe" /                   _all

Microsoft (R) Program Maintenance Utility Version 14.23.28106.4
Copyright (C) Microsoft Corporation.  All rights reserved.


Microsoft (R) Program Maintenance Utility Version 14.23.28106.4
Copyright (C) Microsoft Corporation.  All rights reserved.

        IF EXIST test\evp_extra_test.exe.manifest DEL /F /Q test\evp_extra_test.exe.manifest
        link /nologo /debug /subsystem:console /opt:ref  /nologo /debug /out:test\evp_extra_test.exe @C:\Users\Jim\AppData\Local\Temp\nmBFB6.tmp
evp_extra_test-bin-evp_extra_test.obj : error LNK2019: unresolved external symbol d2i_DSAPrivateKey referenced in function load_example_dsa_key

evp_extra_test-bin-evp_extra_test.obj : error LNK2019: unresolved external symbol EVP_PKEY_set1_DSA referenced in function load_example_dsa_key

evp_extra_test-bin-evp_extra_test.obj : error LNK2019: unresolved external symbol DSA_free referenced in function load_example_dsa_key

test\evp_extra_test.exe : fatal error LNK1120: 3 unresolved externals

NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\bin\HostX64\x64\link.EXE"' : return code '0x460'

Stop.

NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\bin\HostX64\x64\nmake.exe"' : return code '0x2'

Stop.

我正在使用:

Windows 10

开始->Visual Studio 2019->x64 Native Tools 命令提示符 for VS 2019(以管理员身份运行)

根据 VERSION 文件的 OpenSSL 版本 3.0.0。已下载 20191107

构建命令:

perl 配置 VC-WIN64A no-idea no-camellia no-seed no-bf no-cast no-des no-rc2 no-rc4 no-rc5 no-md2 no-md4 no-ripemd no-mdc2 no-dsa no-dh no-ec no-ecdsa no-ecdh no-sock no-ssl2 no-ssl3 no-err no-engine no-hw no-asm

提前致谢,

吉姆

【问题讨论】:

    标签: windows perl openssl


    【解决方案1】:

    您似乎正在使用 OpenSSL 3.0,它是您(可能)从 git master 分支下载的尚未发布的 OpenSSL 开发版本 - 这是所有活跃的 OpenSSL 开发进行的地方。作为一个开发分支,这应该被认为是不稳定的,并不真正适合任何“真正的”使用。看起来 no-dsa 支持目前已被破坏。修复方法在这里:

    https://github.com/openssl/openssl/pull/10375

    让事情正常进行的一种方法是从配置行中删除“no-dsa”。或者,您可以在上述 URL 处应用修复(或等待几天将其合并)。可能最好的方法是只使用稳定版本的 OpenSSL。最新的稳定版本是 1.1.1d,您可以从此处下载 tar:

    https://www.openssl.org/source/

    或者,如果您在本地克隆了 git repo,那么您可以像这样检查该版本:

    $ git checkout OpenSSL_1_1_1d
    

    【讨论】:

    • 啊我的错。我单击了下载页面上的第一个链接。谢谢!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-02-09
    • 2015-06-27
    • 2021-12-04
    • 2020-04-10
    相关资源
    最近更新 更多