在Windows上建立poco c++库

问题描述 投票:0回答:1

我试图在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 == file *.dll not found).

如果我删除 "组件 "文件中的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。我也试着使用从源码建立的openssl (https:/github.compocoprojectopenssl。). 但我得到同样的错误.谁能帮帮我?

谢谢!Xinyu

c++ openssl poco
1个回答
0
投票

好的,如果我删除所有对象文件:文件夹obj64,包括testuite中的obj64,那么一切都OK了。

© www.soinside.com 2019 - 2024. All rights reserved.