QT5 from git, how to enable ssl support?
-
I could not recompile QT5 with -openssl-linked flag.
I tried the following:
@configure -static -platform win32-msvc2010 -openssl-linked -I "C:\Program Files (x86)\GnuWin32\include" -L "C:\Program Files(x86)\GnuWin32\lib" -no-vcproj -opengl desktop -nomake examples -nomake demos@And the compilation fails with output like the:
@D:\QT5\qt5\qtbase\bin\moc.exe -DUNICODE -DWIN32 -DQT_NO_EXCEPTIONS -DQT_
SVG_LIB -DQT_WIDGETS_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I"D:\QT5\q
t5\qtbase\include" -I"D:\QT5\qt5\qtbase\include\QtSvg" -I"D:\QT5\qt5\qtbase\incl
ude\QtWidgets" -I"D:\QT5\qt5\qtbase\include\QtNetwork" -I"D:\QT5\qt5\qtbase\incl
ude\QtGui" -I"D:\QT5\qt5\qtbase\include\QtCore" -I".moc\debug_static" -I"D:\QT5
qt5\qtbase\mkspecs\win32-msvc2010" -D_MSC_VER=1600 -DWIN32 weatherinfo.cpp -o .m
oc\debug_static\weatherinfo.moc
cl -c -nologo -Zm200 -Zc:wchar_t -Zi -MDd -GR -W3 -w34100 -w34189 -DUNIC
ODE -DWIN32 -DQT_NO_EXCEPTIONS -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_NETWORK_LIB -D
QT_GUI_LIB -DQT_CORE_LIB -I"D:\QT5\qt5\qtbase\include" -I"D:\QT5\qt5\qtbase\incl
ude\QtSvg" -I"D:\QT5\qt5\qtbase\include\QtWidgets" -I"D:\QT5\qt5\qtbase\include
QtNetwork" -I"D:\QT5\qt5\qtbase\include\QtGui" -I"D:\QT5\qt5\qtbase\include\QtCo
re" -I".moc\debug_static" -I"D:\QT5\qt5\qtbase\mkspecs\win32-msvc2010" -Fo.obj\d
ebug_static\ C:\Users\unmanner\AppData\Local\Temp\nm716.tmp
weatherinfo.cpp
weatherinfo_plugin_import.cpp
Generating Code...
echo 1 /* CREATEPROCESS_MANIFEST_RESOURCE_ID / 24 / RT_MANIFEST / "de
bug\weatherinfo.exe.embed.manifest">debug\weatherinfo.exe_manifest.rc
if not exist debug\weatherinfo.exe if exist debug\weatherinfo.exe.embed.
manifest del debug\weatherinfo.exe.embed.manifest
if exist debug\weatherinfo.exe.embed.manifest copy /Y debug\weatherinfo.
exe.embed.manifest debug\weatherinfo.exe_manifest.bak
Скопировано файлов: 1.
link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /SUBSYSTEM:WINDOWS "/MANIFEST
DEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.
0' publicKeyToken='6595b64144ccf1df' language='' processorArchitecture='*'" /MA
NIFEST /MANIFESTFILE:debug\weatherinfo.exe.embed.manifest /OUT:debug\weatherinfo
.exe C:\Users\unmanner\AppData\Local\Temp\nm10C7.tmp
Creating library debug\weatherinfo.lib and object debug\weatherinfo.exp
Qt5Networkd.lib(qhttpnetworkconnectionchannel.obj) : error LNK2001: unresolved e
xternal symbol "public: __thiscall QSslConfiguration::~QSslConfiguration(void)"
(??1QSslConfigurationQAEXZ)
Qt5Networkd.lib(moc_qnetworkreplyhttpimpl_p.obj) : error LNK2001: unresolved ext
ernal symbol "public: __thiscall QSslConfiguration::~QSslConfiguration(void)" (?
?1QSslConfigurationQAEXZ)
Qt5Networkd.lib(qhttpthreaddelegate.obj) : error LNK2001: unresolved external sy
mbol "public: __thiscall QSslConfiguration::~QSslConfiguration(void)" (??1QSslCo
nfigurationQAEXZ)
Qt5Networkd.lib(moc_qhttpthreaddelegate_p.obj) : error LNK2001: unresolved exter
nal symbol "public: __thiscall QSslConfiguration::~QSslConfiguration(void)" (??1
QSslConfigurationQAEXZ)
Qt5Networkd.lib(qhttpnetworkconnection.obj) : error LNK2001: unresolved external
symbol "public: __thiscall QSslConfiguration::~QSslConfiguration(void)" (??1QSs
lConfigurationQAEXZ)
Qt5Networkd.lib(qnetworkreply.obj) : error LNK2019: unresolved external symbol "
public: __thiscall QSslConfiguration::~QSslConfiguration(void)" (??1QSslConfigur
ationQAEXZ) referenced in function "public: class QSslConfiguration __thiscal
l QNetworkReply::sslConfiguration(void)const " (?sslConfigurationQNetworkReply
QBE?AVQSslConfigurationXZ)
Qt5Networkd.lib(qnetworkrequest.obj) : error LNK2001: unresolved external symbol
"public: __thiscall QSslConfiguration::~QSslConfiguration(void)" (??1QSslConfig
urationQAEXZ)
Qt5Networkd.lib(qnetworkaccessmanager.obj) : error LNK2001: unresolved external
symbol "public: __thiscall QSslConfiguration::~QSslConfiguration(void)" (??1QSsl
ConfigurationQAEXZ)
Qt5Networkd.lib(qnetworkreplyhttpimpl.obj) : error LNK2001: unresolved external
symbol "public: __thiscall QSslConfiguration::~QSslConfiguration(void)" (??1QSsl
ConfigurationQAEXZ)..........
Qt5Networkd.lib(qhttpnetworkconnectionchannel.obj) : error LNK2019: unresolved e
xternal symbol "public: void __thiscall QSslSocket::connectToHostEncrypted(class
QString const &,unsigned short,class QFlags<enum QIODevice::OpenModeFlag>,enum
QAbstractSocket::NetworkLayerProtocol)" (?connectToHostEncryptedQSslSocketQAE
XABVQStringGV?$QFlagsW4OpenModeFlagQIODeviceW4NetworkLayerProtocolQAbst
ractSocketZ) referenced in function "public: bool __thiscall QHttpNetworkConn
ectionChannel::ensureConnection(void)" (?ensureConnectionQHttpNetworkConnection
ChannelQAE_NXZ)
Qt5Networkd.lib(qhttpnetworkconnectionchannel.obj) : error LNK2019: unresolved e
xternal symbol "public: __int64 __thiscall QSslSocket::encryptedBytesAvailable(v
oid)const " (?encryptedBytesAvailableQSslSocketQBE_JXZ) referenced in functio
n "protected: void __thiscall QHttpNetworkConnectionChannel::_q_error(enum QAbst
ractSocket::SocketError)" (?_q_errorQHttpNetworkConnectionChannelIAEXW4Socket
ErrorQAbstractSocketZ)
debug\weatherinfo.exe : fatal error LNK1120: 22 unresolved externals
NMAKE : fatal error U1077: '"f:\Program Files (x86)\Microsoft Visual Studio 10.0
\VC\BIN\link.EXE"' : return code '0x460'
Stop.
NMAKE : fatal error U1077: '"f:\Program Files (x86)\Microsoft Visual Studio 10.0
\VC\BIN\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.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
@ -
Hi,
Have a look at the "ssl":http://qt-project.org/doc/qt-5.0/qtnetwork/ssl.html documentation, this should help you build Qt with openssl linked.
Hope it helps
-
Hi SGais!
Unfortunately it does not helps. I have the same result again.
You think something wrong with Opensll libraries? As I can see linkage errors referenced to QT internal SSL functions?
Now I tried:
@D:\QT5\qt5>configure -openssl-linked OPENSSL_LIBS="-L/C:\Program Files (x86)\GnuWin32\lib -lssl -lcrypto" -no-vcproj -static -opengl desktop@Directory "C:\Program Files (x86)\GnuWin32\lib" contained:
@24.03.2013 22:29 <DIR> .
24.03.2013 22:29 <DIR> ..
04.09.2008 00:12 2 053 578 libcrypto.a
04.09.2008 00:34 1 900 576 libeay32.dll.a
22.08.2008 23:52 345 886 libssl.a
04.09.2008 00:34 140 536 libssl32.dll.a
24.03.2013 22:29 <DIR> pkgconfig@ -
Sorry I forgot to reply, did you try with "this":http://slproweb.com/products/Win32OpenSSL.html version of OpenSSL ? I've been using it successfully to build Qt (though not linked) Also they provide a more up to date version of OpenSSL (1.0.1k)
-
try (without the slash after -L):
@
OPENSSL_LIBS="-LC:\Program Files (x86)\GnuWin32\lib -lssl -lcrypto"
@