【发布时间】:2020-06-04 13:43:57
【问题描述】:
我正在尝试在 Windows 10(VS 2012)上使用 openssl 构建 poco 库(c++)。使用以下 cmd 文件:
@echo off
set INCLUDE=c:\openssl\include
set LIB=c:\openssl\lib
set _IsNativeEnvironment=true
call "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" amd64
call "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\amd64\vcvars64.bat"
buildwin 110 build all release x64 nosamples notests devenv
我收到链接错误:
1>------ Build started: Project: Crypto, Configuration: release_shared x64 ------
1> Datei *.dll nicht gefunden
1> Datei *.lib nicht gefunden
1> Creating library ..\lib64\PocoCrypto.lib and object ..\lib64\PocoCrypto.exp
1>ECKey.obj : error LNK2001: unresolved external symbol EVP_PKEY_type
1>ECKeyImpl.obj : error LNK2001: unresolved external symbol EVP_PKEY_type
1>RSAKeyImpl.obj : error LNK2001: unresolved external symbol EVP_PKEY_type
1>PKCS12Container.obj : error LNK2001: unresolved external symbol EVP_PKEY_type
1>EVPPKey.obj : error LNK2019: unresolved external symbol EVP_PKEY_type referenced in function "private: void __cdecl Poco::Crypto::EVPPKey::newECKey(char const *)" (?newECKey@EVPPKey@Crypto@Poco@@AEAAXPEBD@Z)
...
(Datei *.dll nicht gefunden == 文件 *.dll 未找到)。
如果我删除文件“组件”中的加密(如果我想使用 https 可以吗?),我会收到以下错误:
1>------ Build started: Project: NetSSL_OpenSSL, Configuration: release_shared x64 ------
1> Creating library ..\lib64\PocoNetSSL.lib and object ..\lib64\PocoNetSSL.exp
1>Context.obj : error LNK2019: unresolved external symbol BIO_new_file referenced in function "private: void __cdecl Poco::Net::Context::initDH(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?initDH@Context@Net@Poco@@AEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
...
我从“Shining Light”(win64)安装了 openssl。我还尝试使用从源代码 (https://github.com/pocoproject/openssl) 构建的 openssl。但我得到同样的错误。 有人可以帮我吗?!
谢谢! 新宇
【问题讨论】: