[SOLVED]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?


  • Lifetime Qt Champion

    Hi,

    Did you check that OpenSSL was detected when building statically ?



  • [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


  • Lifetime Qt Champion

    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............no

    this in "config.summary" file.

    Is it the cause of problem?
    How can I fix it?


  • Lifetime Qt Champion

    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


  • Lifetime Qt Champion

    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..



  • It works perfect now~ Thank you again!


  • Lifetime Qt Champion

    You're welcome !

    Happy coding ! :)


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.