简体   繁体   English

使用 OpenSSL 支持为 Windows Phone 8.1 编译 Qt 5.5 的问题

[英]Issue Compiling Qt 5.5 for Windows Phone 8.1 with OpenSSL Support

I'm trying to build Qt 5.5 for Windows Phone 8.1.我正在尝试为 Windows Phone 8.1 构建 Qt 5.5。 Currently I work on an App using the Qt5 Framework.目前我使用 Qt5 框架开发应用程序。 The App runs fine on iOS and Android.该应用程序在 iOS 和 Android 上运行良好。 Now I want to support Windows Phone too.现在我也想支持 Windows Phone。

In the App I'm using the OpenSSL API to create a certificate signing request and the corresponding keypair.在应用程序中,我使用 OpenSSL API 创建证书签名请求和相应的密钥对。 I also use a QSslSocket.我也使用 QSslSocket。 So I need to compile Qt with OpenSSL support.所以我需要用 OpenSSL 支持编译 Qt。

In my Environment I use:在我的环境中,我使用:

  • Windows 10 Pro视窗 10 专业版
  • Visual Studio 2015 Community Edition Visual Studio 2015 社区版
  • Strawberry Perl (needed to compile OpenSSL) Strawberry Perl(需要编译 OpenSSL)
  • Qt Community Edition (online installer) Qt 社区版(在线安装程序)

For Windows Phone I compiled OpenSSL from Microsoft ( https://github.com/Microsoft/openssl commit 632474b204aa5fd305e30ca851f1a8c09563dbc3)对于 Windows Phone,我从 Microsoft 编译了 OpenSSL( https://github.com/Microsoft/openssl commit 632474b204aa5fd305e30ca851f1a8c09563dbc3)

To compile OpenSSL I used the Command Shell and executed the following commands (from https://github.com/Microsoft/openssl/blob/WinRT/INSTALL.WINAPP ):为了编译 OpenSSL,我使用了命令外壳并执行了以下命令(来自https://github.com/Microsoft/openssl/blob/WinRT/INSTALL.WINAPP ):

C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat
cd C:\openssl
perl Configure no-asm no-hw no-dso VC-WINSTORE
ms\do_winstore
ms\setVSvars ws8.1arm

set LIBPATH=C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.1\ExtensionSDKs\Microsoft.VCLibs\12.0\References\CommonConfiguration\neutral;%LIBPATH%

nmake -f ms\nt.mak init
nmake -f ms\nt.mak

The Compilation seems to be fine.编译似乎没问题。

Then I copied the resulting files from C:\\openssl\\out32 to C:\\lib\\openssl然后我将生成的文件从 C:\\openssl\\out32 复制到 C:\\lib\\openssl

I copied the files from C:\\openssl\\include to C:\\include我将文件从 C:\\openssl\\include 复制到 C:\\include

For compiling the Qt Framework I use the "VS2015 x86 Native Tools Command Prompt" as mentioned in http://wiki.qt.io/WinRTBuild为了编译 Qt 框架,我使用http://wiki.qt.io/WinRTBuild 中提到的“VS2015 x86 Native Tools Command Prompt”

Then in C:\\Qt\\5.5\\Src I execute the two following commands:然后在 C:\\Qt\\5.5\\Src 中我执行以下两个命令:

configure -nomake examples -nomake tests -openssl -I C:\include -L C:\lib\openssl -opensource -prefix C:\Qt\5.5.1 -confirm-license -xplatform winphone-arm-msvc2013 -release

nmake

It compiles and after a while it exits with the following errors:它编译并在一段时间后退出并出现以下错误:

...
Generating Code...
        cl -c -FIqt_pch.h -Yuqt_pch.h -Fp.pch\release\Qt5Network_pch.pch -nologo -FS -O2 -MD -D_HAS_EXCEPTIONS=0 -GR -W3 -w34100 -w34189 -w44996 -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQ_BYTE_ORDER=Q_LITTLE_ENDIAN -DQT_NO_PRINTER -DQT_NO_PRINTDIALOG -DWINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP -DARM -D__ARM__ -D__ARM__ -DQT_NO_USING_NAMESPACE -DQT_BUILD_NETWORK_LIB -DQT_BUILDING_QT -D_CRT_SECURE_NO_WARNINGS -D_USE_MATH_DEFINES -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -DQT_LOCALSOCKET_TCP -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_CORE_LIB -DNDEBUG -I. -IC:\include -I..\..\include -I..\..\include\QtNetwork -I..\..\include\QtNetwork\5.5.1 -I..\..\include\QtNetwork\5.5.1\QtNetwork -Itmp -I..\3rdparty\zlib -Ikernel -I..\..\include\QtCore\5.5.1 -I..\..\include\QtCore\5.5.1\QtCore -I..\..\include\QtCore -I.moc\release -I..\..\mkspecs\winphone-arm-msvc2013 -Fo.obj\release\ @C:\Users\gordon\AppData\Local\Temp\nm609E.tmp
qasn1element.cpp
qssl.cpp
qsslcertificate.cpp
c:\qt\5.5\src\qtbase\src\network\ssl\qsslsocket_winrt_p.h(68) : error C2011: 'QSslSocketBackendPrivate' : 'class' type redefinition
        c:\qt\5.5\src\qtbase\src\network\ssl\qsslsocket_openssl_p.h(100) : see declaration of 'QSslSocketBackendPrivate'
ssl\qsslcertificate.cpp(572) : error C2027: use of undefined type 'QSslSocketBackendPrivate'
        c:\qt\5.5\src\qtbase\src\network\ssl\qsslsocket_openssl_p.h(100) : see declaration of 'QSslSocketBackendPrivate'
ssl\qsslcertificate.cpp(592) : error C2027: use of undefined type 'QSslSocketBackendPrivate'
        c:\qt\5.5\src\qtbase\src\network\ssl\qsslsocket_openssl_p.h(100) : see declaration of 'QSslSocketBackendPrivate'
qsslconfiguration.cpp
qsslcipher.cpp
qsslellipticcurve.cpp
qsslkey_p.cpp
qsslerror.cpp
qsslsocket.cpp
c:\qt\5.5\src\qtbase\src\network\ssl\qsslsocket_winrt_p.h(68) : error C2011: 'QSslSocketBackendPrivate' : 'class' type redefinition
        c:\qt\5.5\src\qtbase\src\network\ssl\qsslsocket_openssl_p.h(100) : see declaration of 'QSslSocketBackendPrivate'
ssl\qsslsocket.cpp(347) : error C2027: use of undefined type 'QSslSocketBackendPrivate'
        c:\qt\5.5\src\qtbase\src\network\ssl\qsslsocket_openssl_p.h(100) : see declaration of 'QSslSocketBackendPrivate'
ssl\qsslsocket.cpp(347) : fatal error C1903: unable to recover from previous error(s); stopping compilation
qsslpresharedkeyauthenticator.cpp
qsslcertificateextension.cpp
qsslcertificate_qt.cpp
c:\qt\5.5\src\qtbase\src\network\ssl\qsslcertificate_p.h(86) : error C3861: 'q_X509_free': identifier not found
ssl\qsslcertificate_qt.cpp(54) : error C2039: 'derData' : is not a member of 'QSslCertificatePrivate'
        c:\qt\5.5\src\qtbase\src\network\ssl\qsslcertificate_p.h(74) : see declaration of 'QSslCertificatePrivate'
        c:\qt\5.5\src\qtbase\src\network\ssl\qsslcertificate_p.h(74) : see declaration of 'QSslCertificatePrivate'
ssl\qsslcertificate_qt.cpp(76) : error C2039: 'subjectMatchesIssuer' : is not a member of 'QSslCertificatePrivate'
        c:\qt\5.5\src\qtbase\src\network\ssl\qsslcertificate_p.h(74) : see declaration of 'QSslCertificatePrivate'
ssl\qsslcertificate_qt.cpp(121) : error C2039: 'subjectAlternativeNames' : is not a member of 'QSslCertificatePrivate'
        c:\qt\5.5\src\qtbase\src\network\ssl\qsslcertificate_p.h(74) : see declaration of 'QSslCertificatePrivate'
...
ssl\qsslcertificate_qt.cpp(377) : error C2660: 'QDataStream::readRawData' : function does not take 1 arguments
ssl\qsslcertificate_qt.cpp(386) : error C3861: 'parseExtension': identifier not found
ssl\qsslcertificate_qt.cpp(388) : error C2065: 'extensions' : undeclared identifier
ssl\qsslcertificate_qt.cpp(398) : error C2065: 'subjectAlternativeNames' : undeclared identifier
ssl\qsslcertificate_qt.cpp(398) : error C2228: left of '.insert' must have class/struct/union
        type is 'unknown-type'
ssl\qsslcertificate_qt.cpp(400) : error C2065: 'subjectAlternativeNames' : undeclared identifier
ssl\qsslcertificate_qt.cpp(400) : error C2228: left of '.insert' must have class/struct/union
        type is 'unknown-type'
ssl\qsslcertificate_qt.cpp(410) : error C2065: 'derData' : undeclared identifier
ssl\qsslcertificate_qt.cpp(411) : error C2065: 'null' : undeclared identifier
ssl\qsslcertificate_qt.cpp(415) : error C2039: 'parseExtension' : is not a member of 'QSslCertificatePrivate'
        c:\qt\5.5\src\qtbase\src\network\ssl\qsslcertificate_p.h(74) : see declaration of 'QSslCertificatePrivate'
ssl\qsslcertificate_qt.cpp(505) : error C2248: 'QSslCertificateExtension::d' : cannot access private member declared in class 'QSslCertificateExtension'
        c:\qt\5.5\src\qtbase\src\network\ssl\qsslcertificateextension.h(69) : see declaration of 'QSslCertificateExtension::d'
        c:\qt\5.5\src\qtbase\src\network\ssl\qsslcertificateextension.h(50) : see declaration of 'QSslCertificateExtension'
ssl\qsslcertificate_qt.cpp(506) : error C2248: 'QSslCertificateExtension::d' : cannot access private member declared in class 'QSslCertificateExtension'
        c:\qt\5.5\src\qtbase\src\network\ssl\qsslcertificateextension.h(69) : see declaration of 'QSslCertificateExtension::d'
        c:\qt\5.5\src\qtbase\src\network\ssl\qsslcertificateextension.h(50) : see declaration of 'QSslCertificateExtension'
ssl\qsslcertificate_qt.cpp(507) : error C2248: 'QSslCertificateExtension::d' : cannot access private member declared in class 'QSslCertificateExtension'
        c:\qt\5.5\src\qtbase\src\network\ssl\qsslcertificateextension.h(69) : see declaration of 'QSslCertificateExtension::d'
        c:\qt\5.5\src\qtbase\src\network\ssl\qsslcertificateextension.h(50) : see declaration of 'QSslCertificateExtension'
ssl\qsslcertificate_qt.cpp(508) : error C2248: 'QSslCertificateExtension::d' : cannot access private member declared in class 'QSslCertificateExtension'
        c:\qt\5.5\src\qtbase\src\network\ssl\qsslcertificateextension.h(69) : see declaration of 'QSslCertificateExtension::d'
        c:\qt\5.5\src\qtbase\src\network\ssl\qsslcertificateextension.h(50) : see declaration of 'QSslCertificateExtension'
ssl\qsslcertificate_qt.cpp(509) : error C2248: 'QSslCertificateExtension::d' : cannot access private member declared in class 'QSslCertificateExtension'
        c:\qt\5.5\src\qtbase\src\network\ssl\qsslcertificateextension.h(69) : see declaration of 'QSslCertificateExtension::d'
        c:\qt\5.5\src\qtbase\src\network\ssl\qsslcertificateextension.h(50) : see declaration of 'QSslCertificateExtension'
qsslcertificate_winrt.cpp
c:\qt\5.5\src\qtbase\src\network\ssl\qsslcertificate_p.h(86) : error C3861: 'q_X509_free': identifier not found
ssl\qsslcertificate_winrt.cpp(98) : error C2039: 'derData' : is not a member of 'QSslCertificatePrivate'
        c:\qt\5.5\src\qtbase\src\network\ssl\qsslcertificate_p.h(74) : see declaration of 'QSslCertificatePrivate'
ssl\qsslcertificate_winrt.cpp(98) : error C2228: left of '.length' must have class/struct/union
        c:\qt\5.5\src\qtbase\src\network\ssl\qsslcertificate_p.h(74) : see declaration of 'QSslCertificatePrivate'
ssl\qsslcertificate_winrt.cpp(98) : error C2228: left of '.data' must have class/struct/union
ssl\qsslcertificate_winrt.cpp(98) : error C2660: 'ABI::Windows::Security::Cryptography::ICryptographicBufferStatics::CreateFromByteArray' : function does not take 2 arguments
qsslkey_qt.cpp
ssl\qsslkey_qt.cpp(117) : error C2039: 'Cipher' : is not a member of 'QSslKeyPrivate'
        c:\qt\5.5\src\qtbase\src\network\ssl\qsslkey_p.h(61) : see declaration of 'QSslKeyPrivate'
ssl\qsslkey_qt.cpp(117) : error C2065: 'Cipher' : undeclared identifier
ssl\qsslkey_qt.cpp(117) : error C2146: syntax error : missing ')' before identifier 'cipher'
ssl\qsslkey_qt.cpp(117) : error C2059: syntax error : ')'
ssl\qsslkey_qt.cpp(118) : error C2143: syntax error : missing ';' before '{'
ssl\qsslkey_qt.cpp(118) : error C2447: '{' : missing function header (old-style formal list?)
ssl\qsslkey_qt.cpp(146) : error C2065: 'derData' : undeclared identifier
ssl\qsslkey_qt.cpp(146) : error C2228: left of '.clear' must have class/struct/union
        type is 'unknown-type'
ssl\qsslkey_qt.cpp(147) : error C2065: 'keyLength' : undeclared identifier
ssl\qsslkey_qt.cpp(179) : error C2065: 'keyLength' : undeclared identifier
ssl\qsslkey_qt.cpp(189) : error C2065: 'keyLength' : undeclared identifier
ssl\qsslkey_qt.cpp(195) : error C2065: 'keyLength' : undeclared identifier
ssl\qsslkey_qt.cpp(213) : error C2065: 'keyLength' : undeclared identifier
ssl\qsslkey_qt.cpp(219) : error C2065: 'keyLength' : undeclared identifier
ssl\qsslkey_qt.cpp(232) : error C2065: 'keyLength' : undeclared identifier
ssl\qsslkey_qt.cpp(236) : error C2065: 'derData' : undeclared identifier
ssl\qsslkey_qt.cpp(252) : error C2065: 'Cipher' : undeclared identifier
ssl\qsslkey_qt.cpp(252) : error C2146: syntax error : missing ';' before identifier 'cipher'
ssl\qsslkey_qt.cpp(252) : error C2065: 'cipher' : undeclared identifier
ssl\qsslkey_qt.cpp(254) : error C2065: 'cipher' : undeclared identifier
ssl\qsslkey_qt.cpp(254) : error C2065: 'DesCbc' : undeclared identifier
ssl\qsslkey_qt.cpp(256) : error C2065: 'cipher' : undeclared identifier
ssl\qsslkey_qt.cpp(256) : error C2065: 'DesEde3Cbc' : undeclared identifier
ssl\qsslkey_qt.cpp(258) : error C2065: 'cipher' : undeclared identifier
ssl\qsslkey_qt.cpp(258) : error C2065: 'Rc2Cbc' : undeclared identifier
ssl\qsslkey_qt.cpp(265) : error C2065: 'cipher' : undeclared identifier
ssl\qsslkey_qt.cpp(266) : error C2065: 'cipher' : undeclared identifier
ssl\qsslkey_qt.cpp(266) : error C3861: 'decrypt': identifier not found
ssl\qsslkey_qt.cpp(273) : error C2065: 'keyLength' : undeclared identifier
ssl\qsslkey_qt.cpp(288) : error C2065: 'Cipher' : undeclared identifier
ssl\qsslkey_qt.cpp(288) : error C2146: syntax error : missing ';' before identifier 'cipher'
ssl\qsslkey_qt.cpp(288) : error C2065: 'cipher' : undeclared identifier
ssl\qsslkey_qt.cpp(288) : error C2065: 'DesEde3Cbc' : undeclared identifier
ssl\qsslkey_qt.cpp(289) : error C2065: 'cipher' : undeclared identifier
ssl\qsslkey_qt.cpp(290) : error C2065: 'cipher' : undeclared identifier
ssl\qsslkey_qt.cpp(290) : error C2065: 'derData' : undeclared identifier
ssl\qsslkey_qt.cpp(290) : error C3861: 'encrypt': identifier not found
ssl\qsslkey_qt.cpp(295) : error C2065: 'derData' : undeclared identifier
qsslkey_winrt.cpp
c:\qt\5.5\src\qtbase\src\network\ssl\qsslcertificate_p.h(86) : error C3861: 'q_X509_free': identifier not found
ssl\qsslkey_winrt.cpp(87) : error C2039: 'Cipher' : is not a member of 'QSslKeyPrivate'
        c:\qt\5.5\src\qtbase\src\network\ssl\qsslkey_p.h(61) : see declaration of 'QSslKeyPrivate'
ssl\qsslkey_winrt.cpp(87) : error C2065: 'Cipher' : undeclared identifier
ssl\qsslkey_winrt.cpp(87) : error C2923: 'QHash' : 'Cipher' is not a valid template type argument for parameter 'Key'
ssl\qsslkey_winrt.cpp(60) : error C2512: 'QHash' : no appropriate default constructor available
ssl\qsslkey_winrt.cpp(72) : error C2039: 'DesCbc' : is not a member of 'QSslKeyPrivate'
        c:\qt\5.5\src\qtbase\src\network\ssl\qsslkey_p.h(61) : see declaration of 'QSslKeyPrivate'
ssl\qsslkey_winrt.cpp(72) : error C2065: 'DesCbc' : undeclared identifier
ssl\qsslkey_winrt.cpp(72) : error C2660: 'ABI::Windows::Security::Cryptography::Core::ISymmetricKeyAlgorithmProviderStatics::OpenAlgorithm' : function does not take 1 arguments
ssl\qsslkey_winrt.cpp(75) : error C2039: 'DesEde3Cbc' : is not a member of 'QSslKeyPrivate'
        c:\qt\5.5\src\qtbase\src\network\ssl\qsslkey_p.h(61) : see declaration of 'QSslKeyPrivate'
ssl\qsslkey_winrt.cpp(75) : error C2065: 'DesEde3Cbc' : undeclared identifier
ssl\qsslkey_winrt.cpp(75) : error C2660: 'ABI::Windows::Security::Cryptography::Core::ISymmetricKeyAlgorithmProviderStatics::OpenAlgorithm' : function does not take 1 arguments
ssl\qsslkey_winrt.cpp(78) : error C2039: 'Rc2Cbc' : is not a member of 'QSslKeyPrivate'
        c:\qt\5.5\src\qtbase\src\network\ssl\qsslkey_p.h(61) : see declaration of 'QSslKeyPrivate'
ssl\qsslkey_winrt.cpp(78) : error C2065: 'Rc2Cbc' : undeclared identifier
ssl\qsslkey_winrt.cpp(78) : error C2660: 'ABI::Windows::Security::Cryptography::Core::ISymmetricKeyAlgorithmProviderStatics::OpenAlgorithm' : function does not take 1 arguments
ssl\qsslkey_winrt.cpp(92) : error C2039: 'Cipher' : is not a member of 'QSslKeyPrivate'
        c:\qt\5.5\src\qtbase\src\network\ssl\qsslkey_p.h(61) : see declaration of 'QSslKeyPrivate'
ssl\qsslkey_winrt.cpp(92) : error C2065: 'Cipher' : undeclared identifier
ssl\qsslkey_winrt.cpp(92) : error C2146: syntax error : missing ')' before identifier 'cipher'
ssl\qsslkey_winrt.cpp(92) : error C2059: syntax error : ')'
ssl\qsslkey_winrt.cpp(93) : error C2143: syntax error : missing ';' before '{'
ssl\qsslkey_winrt.cpp(93) : error C2447: '{' : missing function header (old-style formal list?)
ssl\qsslkey_winrt.cpp(146) : error C2039: 'decrypt' : is not a member of 'QSslKeyPrivate'
        c:\qt\5.5\src\qtbase\src\network\ssl\qsslkey_p.h(61) : see declaration of 'QSslKeyPrivate'
ssl\qsslkey_winrt.cpp(146) : error C2065: 'Cipher' : undeclared identifier
ssl\qsslkey_winrt.cpp(146) : error C2146: syntax error : missing ')' before identifier 'cipher'
ssl\qsslkey_winrt.cpp(146) : error C2059: syntax error : ')'
ssl\qsslkey_winrt.cpp(147) : error C2143: syntax error : missing ';' before '{'
ssl\qsslkey_winrt.cpp(147) : error C2447: '{' : missing function header (old-style formal list?)
ssl\qsslkey_winrt.cpp(151) : error C2039: 'encrypt' : is not a member of 'QSslKeyPrivate'
        c:\qt\5.5\src\qtbase\src\network\ssl\qsslkey_p.h(61) : see declaration of 'QSslKeyPrivate'
ssl\qsslkey_winrt.cpp(151) : error C2065: 'Cipher' : undeclared identifier
ssl\qsslkey_winrt.cpp(151) : error C2146: syntax error : missing ')' before identifier 'cipher'
ssl\qsslkey_winrt.cpp(151) : error C2059: syntax error : ')'
ssl\qsslkey_winrt.cpp(152) : error C2143: syntax error : missing ';' before '{'
ssl\qsslkey_winrt.cpp(152) : error C2447: '{' : missing function header (old-style formal list?)
qsslsocket_winrt.cpp
c:\qt\5.5\src\qtbase\src\network\ssl\qsslcertificate_p.h(86) : error C3861: 'q_X509_free': identifier not found
qsslellipticcurve_dummy.cpp
qsslcertificate_openssl.cpp
qsslcontext_openssl.cpp
ssl\qsslcontext_openssl.cpp(471) : error C2027: use of undefined type 'ssl_session_st'
        C:\include\openssl/ssl.h(352) : see declaration of 'ssl_session_st'
ssl\qsslcontext_openssl.cpp(471) : error C2227: left of '->tlsext_tick_lifetime_hint' must point to class/struct/union/generic type
qsslellipticcurve_openssl.cpp
Generating Code...
Compiling...
qsslkey_openssl.cpp
qsslsocket_openssl.cpp
ssl\qsslsocket_openssl.cpp(87) : error C2039: 'ptrCertOpenSystemStoreW' : is not a member of 'QSslSocketPrivate'
        c:\qt\5.5\src\qtbase\src\network\ssl\qsslsocket_p.h(97) : see declaration of 'QSslSocketPrivate'
ssl\qsslsocket_openssl.cpp(87) : error C2146: syntax error : missing ';' before identifier 'ptrCertOpenSystemStoreW'
ssl\qsslsocket_openssl.cpp(87) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
ssl\qsslsocket_openssl.cpp(88) : error C2039: 'ptrCertFindCertificateInStore' : is not a member of 'QSslSocketPrivate'
        c:\qt\5.5\src\qtbase\src\network\ssl\qsslsocket_p.h(97) : see declaration of 'QSslSocketPrivate'
ssl\qsslsocket_openssl.cpp(88) : error C2146: syntax error : missing ';' before identifier 'ptrCertFindCertificateInStore'
ssl\qsslsocket_openssl.cpp(88) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
ssl\qsslsocket_openssl.cpp(89) : error C2039: 'ptrCertCloseStore' : is not a member of 'QSslSocketPrivate'
        c:\qt\5.5\src\qtbase\src\network\ssl\qsslsocket_p.h(97) : see declaration of 'QSslSocketPrivate'
ssl\qsslsocket_openssl.cpp(89) : error C2146: syntax error : missing ';' before identifier 'ptrCertCloseStore'
ssl\qsslsocket_openssl.cpp(89) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
ssl\qsslsocket_openssl.cpp(549) : error C3861: 'LoadLibraryW': identifier not found
ssl\qsslsocket_openssl.cpp(556) : error C2146: syntax error : missing ';' before identifier 'GetProcAddress'
ssl\qsslsocket_openssl.cpp(557) : error C2146: syntax error : missing ';' before identifier 'GetProcAddress'
ssl\qsslsocket_openssl.cpp(558) : error C2146: syntax error : missing ';' before identifier 'GetProcAddress'
ssl\qsslsocket_openssl.cpp(749) : error C2065: 'HCERTSTORE' : undeclared identifier
ssl\qsslsocket_openssl.cpp(749) : error C2146: syntax error : missing ';' before identifier 'hSystemStore'
ssl\qsslsocket_openssl.cpp(749) : error C2065: 'hSystemStore' : undeclared identifier
ssl\qsslsocket_openssl.cpp(757) : error C2065: 'hSystemStore' : undeclared identifier
ssl\qsslsocket_openssl.cpp(757) : error C2064: term does not evaluate to a function taking 2 arguments
ssl\qsslsocket_openssl.cpp(759) : error C2065: 'hSystemStore' : undeclared identifier
ssl\qsslsocket_openssl.cpp(760) : error C2065: 'PCCERT_CONTEXT' : undeclared identifier
ssl\qsslsocket_openssl.cpp(760) : error C2146: syntax error : missing ';' before identifier 'pc'
ssl\qsslsocket_openssl.cpp(760) : error C2065: 'pc' : undeclared identifier
ssl\qsslsocket_openssl.cpp(762) : error C2065: 'pc' : undeclared identifier
ssl\qsslsocket_openssl.cpp(762) : error C2065: 'hSystemStore' : undeclared identifier
ssl\qsslsocket_openssl.cpp(762) : error C2065: 'X509_ASN_ENCODING' : undeclared identifier
ssl\qsslsocket_openssl.cpp(762) : error C2065: 'CERT_FIND_ANY' : undeclared identifier
ssl\qsslsocket_openssl.cpp(763) : error C2065: 'pc' : undeclared identifier
ssl\qsslsocket_openssl.cpp(765) : error C2065: 'pc' : undeclared identifier
ssl\qsslsocket_openssl.cpp(765) : error C2227: left of '->pbCertEncoded' must point to class/struct/union/generic type
        type is 'unknown-type'
ssl\qsslsocket_openssl.cpp(765) : error C2227: left of '->cbCertEncoded' must point to class/struct/union/generic type
        type is 'unknown-type'
ssl\qsslsocket_openssl.cpp(769) : error C2065: 'hSystemStore' : undeclared identifier
ssl\qsslsocket_openssl.cpp(1430) : error C2065: 'PCCERT_CONTEXT' : undeclared identifier
ssl\qsslsocket_openssl.cpp(1430) : error C2146: syntax error : missing ';' before identifier 'wincert'
ssl\qsslsocket_openssl.cpp(1430) : error C2065: 'wincert' : undeclared identifier
ssl\qsslsocket_openssl.cpp(1430) : error C2065: 'X509_ASN_ENCODING' : undeclared identifier
ssl\qsslsocket_openssl.cpp(1430) : error C3861: 'CertCreateCertificateContext': identifier not found
ssl\qsslsocket_openssl.cpp(1431) : error C2065: 'wincert' : undeclared identifier
ssl\qsslsocket_openssl.cpp(1440) : error C2065: 'CERT_CHAIN_PARA' : undeclared identifier
ssl\qsslsocket_openssl.cpp(1440) : error C2146: syntax error : missing ';' before identifier 'parameters'
ssl\qsslsocket_openssl.cpp(1440) : error C2065: 'parameters' : undeclared identifier
ssl\qsslsocket_openssl.cpp(1441) : error C2065: 'parameters' : undeclared identifier
ssl\qsslsocket_openssl.cpp(1441) : error C2070: 'unknown-type': illegal sizeof operand
ssl\qsslsocket_openssl.cpp(1442) : error C2065: 'parameters' : undeclared identifier
ssl\qsslsocket_openssl.cpp(1442) : error C2228: left of '.cbSize' must have class/struct/union
        type is 'unknown-type'
ssl\qsslsocket_openssl.cpp(1442) : error C2070: 'unknown-type': illegal sizeof operand
ssl\qsslsocket_openssl.cpp(1444) : error C2065: 'parameters' : undeclared identifier
ssl\qsslsocket_openssl.cpp(1444) : error C2228: left of '.RequestedUsage' must have class/struct/union
        type is 'unknown-type'
ssl\qsslsocket_openssl.cpp(1444) : error C2228: left of '.dwType' must have class/struct/union
ssl\qsslsocket_openssl.cpp(1444) : error C2065: 'USAGE_MATCH_TYPE_AND' : undeclared identifier
ssl\qsslsocket_openssl.cpp(1445) : error C2065: 'parameters' : undeclared identifier
ssl\qsslsocket_openssl.cpp(1445) : error C2228: left of '.RequestedUsage' must have class/struct/union
        type is 'unknown-type'
ssl\qsslsocket_openssl.cpp(1445) : error C2228: left of '.Usage' must have class/struct/union
ssl\qsslsocket_openssl.cpp(1445) : error C2228: left of '.cUsageIdentifier' must have class/struct/union
ssl\qsslsocket_openssl.cpp(1446) : error C2065: 'szOID_PKIX_KP_SERVER_AUTH' : undeclared identifier
ssl\qsslsocket_openssl.cpp(1446) : error C2065: 'szOID_PKIX_KP_CLIENT_AUTH' : undeclared identifier
ssl\qsslsocket_openssl.cpp(1447) : error C2065: 'parameters' : undeclared identifier
ssl\qsslsocket_openssl.cpp(1447) : error C2228: left of '.RequestedUsage' must have class/struct/union
        type is 'unknown-type'
ssl\qsslsocket_openssl.cpp(1447) : error C2228: left of '.Usage' must have class/struct/union
ssl\qsslsocket_openssl.cpp(1447) : error C2228: left of '.rgpszUsageIdentifier' must have class/struct/union
ssl\qsslsocket_openssl.cpp(1453) : error C2065: 'PCCERT_CHAIN_CONTEXT' : undeclared identifier
ssl\qsslsocket_openssl.cpp(1453) : error C2146: syntax error : missing ';' before identifier 'chain'
ssl\qsslsocket_openssl.cpp(1453) : error C2065: 'chain' : undeclared identifier
ssl\qsslsocket_openssl.cpp(1456) : error C2065: 'wincert' : undeclared identifier
ssl\qsslsocket_openssl.cpp(1459) : error C2065: 'parameters' : undeclared identifier
ssl\qsslsocket_openssl.cpp(1462) : error C2065: 'chain' : undeclared identifier
ssl\qsslsocket_openssl.cpp(1454) : error C3861: 'CertGetCertificateChain': identifier not found
ssl\qsslsocket_openssl.cpp(1494) : error C2065: 'chain' : undeclared identifier
ssl\qsslsocket_openssl.cpp(1494) : error C2227: left of '->TrustStatus' must point to class/struct/union/generic type
        type is 'unknown-type'
ssl\qsslsocket_openssl.cpp(1494) : error C2228: left of '.dwErrorStatus' must have class/struct/union
ssl\qsslsocket_openssl.cpp(1495) : error C2065: 'CERT_TRUST_NO_ERROR' : undeclared identifier
ssl\qsslsocket_openssl.cpp(1495) : error C2065: 'chain' : undeclared identifier
ssl\qsslsocket_openssl.cpp(1495) : error C2227: left of '->cChain' must point to class/struct/union/generic type
        type is 'unknown-type'
ssl\qsslsocket_openssl.cpp(1496) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
ssl\qsslsocket_openssl.cpp(1496) : error C2146: syntax error : missing ';' before identifier 'finalChain'
ssl\qsslsocket_openssl.cpp(1496) : error C2065: 'finalChain' : undeclared identifier
ssl\qsslsocket_openssl.cpp(1496) : error C2065: 'chain' : undeclared identifier
ssl\qsslsocket_openssl.cpp(1496) : error C2227: left of '->rgpChain' must point to class/struct/union/generic type
        type is 'unknown-type'
ssl\qsslsocket_openssl.cpp(1496) : error C2227: left of '->cChain' must point to class/struct/union/generic type
        type is 'unknown-type'
ssl\qsslsocket_openssl.cpp(1499) : error C2065: 'finalChain' : undeclared identifier
ssl\qsslsocket_openssl.cpp(1499) : error C2227: left of '->TrustStatus' must point to class/struct/union/generic type
        type is 'unknown-type'
ssl\qsslsocket_openssl.cpp(1499) : error C2228: left of '.dwErrorStatus' must have class/struct/union
ssl\qsslsocket_openssl.cpp(1500) : error C2065: 'CERT_TRUST_NO_ERROR' : undeclared identifier
ssl\qsslsocket_openssl.cpp(1500) : error C2065: 'finalChain' : undeclared identifier
ssl\qsslsocket_openssl.cpp(1500) : error C2227: left of '->cElement' must point to class/struct/union/generic type
        type is 'unknown-type'
ssl\qsslsocket_openssl.cpp(1501) : error C2065: 'finalChain' : undeclared identifier
ssl\qsslsocket_openssl.cpp(1501) : error C2227: left of '->rgpElement' must point to class/struct/union/generic type
        type is 'unknown-type'
ssl\qsslsocket_openssl.cpp(1501) : error C2227: left of '->cElement' must point to class/struct/union/generic type
        type is 'unknown-type'
ssl\qsslsocket_openssl.cpp(1501) : error C2227: left of '->pCertContext' must point to class/struct/union/generic type
ssl\qsslsocket_openssl.cpp(1502) : error C2227: left of '->pbCertEncoded' must point to class/struct/union/generic type
ssl\qsslsocket_openssl.cpp(1502) : error C2065: 'finalChain' : undeclared identifier
ssl\qsslsocket_openssl.cpp(1502) : error C2227: left of '->rgpElement' must point to class/struct/union/generic type
        type is 'unknown-type'
ssl\qsslsocket_openssl.cpp(1502) : error C2227: left of '->cElement' must point to class/struct/union/generic type
        type is 'unknown-type'
ssl\qsslsocket_openssl.cpp(1502) : error C2227: left of '->pCertContext' must point to class/struct/union/generic type
ssl\qsslsocket_openssl.cpp(1502) : error C2227: left of '->cbCertEncoded' must point to class/struct/union/generic type
ssl\qsslsocket_openssl.cpp(1505) : error C2065: 'chain' : undeclared identifier
ssl\qsslsocket_openssl.cpp(1505) : error C3861: 'CertFreeCertificateChain': identifier not found
ssl\qsslsocket_openssl.cpp(1507) : error C2065: 'wincert' : undeclared identifier
ssl\qsslsocket_openssl.cpp(1507) : error C3861: 'CertFreeCertificateContext': identifier not found
qsslsocket_openssl_symbols.cpp
Generating Code...
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\x86_arm\cl.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.

It seems to me that there is something wrong with the OpenSSl library.在我看来,OpenSSl 库有问题。 Does anyone have a clue what I can do to fix the issue ?有没有人知道我可以做些什么来解决这个问题?

I've used OpenSSL with Qt5.5 in iOS (I started back a few versions ago, and have successfully moved forward with it.) I haven't tried in Windows, but I'll probably need to at some point, so your post worries me!我在 iOS 中使用了带有 Qt5.5 的 OpenSSL(我在几个版本前开始使用它,并且已经成功地向前推进了它。)我还没有在 Windows 中尝试过,但我可能在某个时候需要,所以你的帖子让我担心!

Anyway, I've used a number of libraries which had similar problems to begin with.无论如何,我已经使用了许多具有类似问题的库。 It looks like you have a bunch of duplicate code now which is colliding.看起来您现在有一堆重复的代码正在发生冲突。 You need to exclude parts of the source.您需要排除部分来源。

Focus on one of these at a time.一次专注于其中之一。 I suggest starting with your first error:我建议从你的第一个错误开始:

c:\qt\5.5\src\qtbase\src\network\ssl\qsslsocket_winrt_p.h(68) : error C2011: 'QSslSocketBackendPrivate' : 'class' type redefinition
        c:\qt\5.5\src\qtbase\src\network\ssl\qsslsocket_openssl_p.h(100) : see declaration of 'QSslSocketBackendPrivate'

Apparently, by the time you get to qsslsocket_winrt_p.h, you've already defined the QSslSocket class.显然,当您到达 qsslsocket_winrt_p.h 时,您已经定义了 QSslSocket 类。 Look through the list of files which compiled before that.查看在此之前编译的文件列表。 It ought to be in there if you open them or search through with your IDE.如果您打开它们或使用 IDE 进行搜索,它应该在那里。 Try "removing" the offending blocks of code from either the first or second attempts to define the class by adding precomplier directives around it, ie.通过在类周围添加预编译器指令,尝试从第一次或第二次定义类的尝试中“删除”有问题的代码块,即。 #define, #ifdef, etc. #define、#ifdef 等

It might take a day's work, but you ought to be able to sift though it eventually... I've been there!这可能需要一天的工作,但你最终应该能够筛选它......我一直在那里!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM