在Windows上构建poco c ++库

时间:2020-06-04 13:43:57

标签: c++ openssl poco

我正在尝试在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找不到)。

如果我删除文件“ components”中的Crypto(如果要使用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。但是我得到了同样的错误。 有人可以帮我吗?!

谢谢! 新余

1 个答案:

答案 0 :(得分:0)

好的,如果我删除所有对象文件:obj64文件夹,包括testsuite中的obj64,那么一切正常。

相关问题