Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

No QsslSocket unless I compile with includes and libs in NDK folder



  • Hello, I got Qt for arm and I cannot even compile QsslSocket, it's not just a linker problem...
    So I took the two libraries -cryto and ssl- from an old app and got the headers from github, put them in the NDK folder (i'm coming to the point) and compiled Qt.
    From then I could compile the QSslSocket and had no linker problems, but I have a wrong version... So i used this script to generate the libraries and now I'm almost good to go...
    But I have utterly forgotten in which folders of the NDK I had put the files for it to work, I know it's silly but I'm stuck here.
    I tried to add the libs and headers in platform tools, in sysroot, and even in toolchain (I feel like I'm going to get bashed) but the configure script keeps saying no ssl.
    You have an ideas ? Or maybe I'll try and do like anyone else ,adding the librairies in the apk build step menu, but this won't solve the compiler complaining about no QSslSocket.
    I don't understand why I found absolutely no articles online refering to this, people are talking about not being able to link, not compilation errors.


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    See @ekkescorner's Android OpenSSL Qt repo. He provides a script to build OpenSSL for Android as well as a .pri file to include them in the final package of your application.

    By the way, why are you compiling Qt yourself ?



  • Oh that's the repo I used to compile the libraries I needed.
    I'm going to try following the inctructions to the end.
    It's just that I can't find precompiled qmake for arm, once I found the whole package with qtcreator and qmake build for arm but I could not get my hands on it again.


  • Lifetime Qt Champion

    If you use the online installer you can simply installed the pre-compiled Android Qt version.

    You still need to provide OpenSSL yourself but the rest it ready for use.



  • @SGaist thanks for the link, this one should not be broken as mine, because despite having followed to the letter the instructions, compilation yields:
    unknown type name 'QSslSocket', from there I should be able to include openssl.
    Cool =)


Log in to reply