Qt World Summit: Register Today!

Is QSsl not compiled by default in Qt 5.12.2?

  • I am getting this error:

    Qt/5.12.2/gcc_64/include/QtNetwork/qdtls.h:137:5: error: ‘QSslSocket’ does not name a type; did you mean ‘QUdpSocket’?

    Apparently we didn't get this error in 5.9.7. What do we need to do in our config or code to fix this? We have network in our QT += list.

  • Moderators

    Are you building yourself, or are you getting the Qt binaries from somewhere?

    If you do the former, pass -ssl to the ./configure script so you force the auto-detection to be ignored on that one. Aside from that you need the openssl headers to compile with SSL support. On my machine (debian testing) these go by the libssl-dev package for the 1.1.1b version of OpenSSL.

  • I am not sure if this is the right fix, but we modified our Qt/5.12.2/gcc_64/include/QtNetwork/qtnetwork-config.h file:

    #define QT_FEATURE_dtls -1

    We changed the define from 1 to -1 to disable dtls. I would have thought anything that depends upon QSsl would be disabled if QSsl was disabled. QT_NO_SSL is showing as defined even though we have the ssl dev libs installed in Linux.

  • Lifetime Qt Champion


    What version of OpenSSL have you installed ?

    OpenSSL support is build by default but dynamically loaded. You have have a compatible version of OpenSSL available.

Log in to reply