OpenSSL NMAKE无法解析的外部符号

我正在尝试编译非常轻便的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-> VS 64的x64本机工具命令提示符(以管理员身份运行)

OpenSSL版本3.0.0(根据VERSION文件)。下载20191107

构建命令:

perl配置VC-WIN64A无想法无茶花无种子无bf无播种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

预先感谢

吉姆

wenwen322079 回答:OpenSSL NMAKE无法解析的外部符号

您似乎正在使用OpenSSL 3.0,它仍是您从git master分支(大概是从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
本文链接:https://www.f2er.com/3147179.html

大家都在问