ERROR: "Protocol "https" is unknown"(static)
-
@QNetworkAccessManager nam= new QNetworkAccessManager(this);
QNetworkRequest request= QNetworkRequest(QUrl(HttpsFileURL));
request.setRawHeader("Content-Type", "application/x-www-form-urlencoded");
nam->get(request);
connect(nam,SIGNAL(finished(QNetworkReply)),this,SLOT(downloaded(QNetworkReply*)));@@void Update::downloaded(QNetworkReply *reply)
{
if(reply->error() == QNetworkReply::NoError){/write file/}
else
qDebug()<<"ERROR:"<<reply->errorString();
}@It works fine if I build it with Qt 5.4.0 MinGW 32bit (dynamic)
but It says "ERROR: "Protocol "https" is unknown"" if I build with Qt 5.4.0 MinGW "static"
Which files do I have to include for https support on static build? -
Hi,
Did you check that OpenSSL was detected when building statically ?
-
There's no reason for the build to fail if you are letting Qt auto detect OpenSSL. If it can't find it then that part won't be compiled.
Check configure's summary before starting to build Qt
-
[quote author="SGaist" date="1419895586"]There's no reason for the build to fail if you are letting Qt auto detect OpenSSL. If it can't find it then that part won't be compiled.
Check configure's summary before starting to build Qt[/quote]
oh I found
bq. Glib support................no
CUPS support................no
OpenVG support..............no
SSL support.................no
OpenSSL support.............no
Qt D-Bus support............nothis in "config.summary" file.
Is it the cause of problem?
How can I fix it? -
Give configure the path to your OpenSSL headers folder as well as libraries folder
-
[quote author="SGaist" date="1419896773"]Give configure the path to your OpenSSL headers folder as well as libraries folder[/quote]
I had added
"INCLUDEPATH += C:\OpenSSL-Win32\include" to .pro file
and
added 'C:\OpenSSL-Win32\bin' to PATH in build environment of static build before post this thread.I don't know what do I have to do next..
Which header file of <openssl/?> do I have to include in source file?
and which libs have to add to .pro file -
What pro file ? It's configure that needs to know these informations.
bin contains dlls, on Windows you don't like to dlls but to lib files.@configure -I C:/OpenSSL-Win32/include -L C:/OpenSSL-Win32/lib@
-
[quote author="SGaist" date="1419898435"]What pro file ? It's configure that needs to know these informations.
bin contains dlls, on Windows you don't like to dlls but to lib files.@configure -I C:/OpenSSL-Win32/include -L C:/OpenSSL-Win32/lib@[/quote]
Oh I miss understood.
I did "configure -platform win32-g++ -static -release -opensource -opengl desktop -I C:/OpenSSL-Win32/include -L C:/OpenSSL-Win32/lib"
and config.summary became
SSL support.................yes
OpenSSL support.............yes
now.
rebuilding.. -
You're welcome !
Happy coding ! :)
-
-
S SGaist marked this topic as a question on
-
S SGaist has marked this topic as solved on