Unsolved Need help to understand how Qt Creator and Configure works
-
Hi,
My main problem is related to OpenSSL. While my apps works well they way it's builded on my computer, the QSslSocket::supportsSsl() return false on some configuration, even with ssleay32.dll and libeay32.dll in the same folder.
I'm not really used to play with build configuration, so I've really hard time to understand how it works.
I wanted to make a static build and found this page : http://doc.qt.io/qt-5/ssl.html
It says :
By default, an SSL-enabled Qt library dynamically loads any installed OpenSSL library at run-time. However, it is possible to link against the library at compile-time by configuring Qt with the -openssl-linked option.
I'm using Qt Creator with mingw32 on Windows 7, and I've no idea of where that "./configure -openssl-linked" is supposed to fit in Qt Creator.
Can anyone help me ?
Regards,
-
@kragnfrol as I undestand, this has nothing to do with Qt Creator but with build Qt itself from sources, as this example from the doc page you referred is showing:
OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked
so it's build Qt from sources and linking it statically to the OpenSSL library available in that particular machine at the build (compile) time.
-
Hi,
Which version of OpenSSL are you using ?
-
I'm using OpenSSL 1.0.2l
@Pablo-J-Rogina Does it mean I will have to rebuild Qt if I want to statically link OpenSsl in my app ?
-
If you are using OpenSSL directly in your app, no. Otherwise, yes.
-
@kragnfrol said in Need help to understand how Qt Creator and Configure works:
I'm using OpenSSL 1.0.2l
What version of Qt are you using? IIRC, Qt 5.10 and earlier are compatible with OpenSSL 1.0, but Qt 5.11 switched to OpenSSL 1.1.[EDIT: My bad; Qt 5.11 is still pre-built against OpenSSL 1.0]The problem is that OpenSSL 1.0 -> 1.1 broke compatibility.
-
@JKSH The OpenSSL 1.1 backend is available since 5.10 as build option. IIRC, the pre-built binaries are still using OpenSSL 1.0 because of "older available distribution". However, I don't know what version of OpenSSL is currently used for the Windows pre-built package.
-
@SGaist said in Need help to understand how Qt Creator and Configure works:
IIRC, the pre-built binaries are still using OpenSSL 1.0 because of "older available distribution". However, I don't know what version of OpenSSL is currently used for the Windows pre-built package.
You're right.
I installed Qt 5.11 for MSVC 2015 32-bit, and I had OpenSSL 1.0.2o 32-bit in my PATH. My app was able to download from a HTTPS site.
@kragnfrol said in Need help to understand how Qt Creator and Configure works:
QSslSocket::supportsSsl() return false on some configuration, even with ssleay32.dll and libeay32.dll in the same folder.
What configuration did you use?