How to add OpenSSL support for Android in QT windows



  • Hello i am trying to develop an app as a project for school. I ran to a problem. I was greeted with this.

    alt text

    After google searching here is what i found out. It would seem that google has stopped support of openSSL (the one responsible for httprequests) on android 7 + . So again i went to googling for solutions and stumbled into an official documentation form Qt on how to solve this.

    https://doc.qt.io/qt-5/opensslsupport.html

    Now again more problems, It would seem that for me to do it is to use a Linux based OS, which i dont have. So hence the Title. Is there anyway for me Using QT running on a WINDOWS operating system to add openSSL support to my android application?

    I have read somewhere that i can just Build Android APK > Additional Libraries > Add , but i do not know which files and the locations of the correct files.

    Thank you very much :)

    Qt Creator v 4.6.1 and Qt v 5.11



  • A best way it is to compile OpenSSL yourself. F.e. it can "simple" to do using Linux host. Just install the Linux (with Android NDK ) on a VirtualMachine and compile the OpenSSL there, and then just take a resulting binaries to use for Windows host.

    PS: Also, as an option, you can download pre-compiled OpenSSL binaries (please search in a Google), but is ia a most worse case.



  • Okay, i have zero experience in linux so bear with me please, can you give me a step by step guide on how to do the compiling of OpenSSL. i think i can do the downloading and installing of qt and android NDK on my own.



  • i have zero experience in linux so bear with me please, can you give me a step by step guide

    A google has a lot of 'build scripts' located, e.g. on github. You need just take that scripts and build OpenSSL. e.g. from here

    installing of qt and android NDK on my own.

    Qt is not need in this case. You need only in NDK (just download it and unpack).



  • @Knox you may want to take a look at this guide about building OpenSSL for Qt and Android



  • @Pablo-J.-Rogina I got lost in "Build OpenSsl" ./configure says directory not found. where should i run these comands?



  • Set appropriate values to the _ANDROID_EABI and _ANDROID_ARCH variables. For example, to build for 64-bit ARM architecture using toolchain version v4.9, set aarch64-linux-android-4.9 and arch-arm64 values to _ANDROID_EABI and _ANDROID_ARCH respectively.
    Add the windows-x86 or windows-x86_64 to the hosts list on line 107, if your build host is Windows.
    Add the following after line 128 to build for 64-bit ARM architecture:


Log in to reply
 

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