ERROR: "Protocol "https" is unknown"(static)
-
wrote on 29 Dec 2014, 23:00 last edited by SGaist
@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 ?
-
wrote on 29 Dec 2014, 23:23 last edited by
[quote author="SGaist" date="1419894880"]Hi,
Did you check that OpenSSL was detected when building statically ?[/quote]
Hi!!!
How can I check it?
There's no compile issues in compile output
I'm still googling but I can't find solution -
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
-
wrote on 29 Dec 2014, 23:41 last edited by
[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
-
wrote on 29 Dec 2014, 23:59 last edited by
[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@
-
wrote on 30 Dec 2014, 00:41 last edited by
[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.. -
wrote on 30 Dec 2014, 01:12 last edited by
It works perfect now~ Thank you again!
-
You're welcome !
Happy coding ! :)
-
-
-
8/11