Results 1 to 3 of 3

Thread: Deploying a Qt application on Android: adding additional libraries such as OpenSSL

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2012
    Thanked 21 Times in 21 Posts
    Qt products
    Qt4 Qt5
    Unix/X11 Windows Android

    Question Deploying a Qt application on Android: adding additional libraries such as OpenSSL

    As the title already says, I'm currently trying to deploy additional libraries (such as OpenSSL) within my Qt application.

    I compiled Qt 5.3.1 as well as OpenSSL for Android from the sources.

    Compiling and deploying a first test application ( worked fine. I think the Android version of Qt is configured well.

    Now I'm trying to link against OpenSSL:
    Qt Code:
    1. LIBS += -L/opt/android-openssl/usr/lib/ -lcrypto
    2. INCLUDEPATH += /opt/android-openssl/usr/include
    4. ANDROID_EXTRA_LIBS += /opt/android-openssl/usr/lib/
    To copy to clipboard, switch view to plain text mode 
    Compilation seems to work, but deploying fails.
    I'm getting a clear error message:
    The file name of external library /opt/android-openssl/usr/lib/ must begin with "lib" and end with the suffix ".so".
    Simply renaming the file does not work of course since my program links against "" and doesn't find a file "". But I'm only able to deploy a file named "". That's the problem.

    How can I walk around the problem?

    Can I try to get a file called "" without version suffix? Here's the script I'm using to build OpenSSL:
    (I simply modified the script from the Arch repository:
    How to configure OpenSSL to leave the version suffix? I searched a lot but I've found no solution yet.

    The documentation of OpenSSL says:
    Specify the full library name when calling Java's System.load. That is, call System.load(“”). Also note that some Android routines expect the prefix of “lib” and suffix of “so”, so you might have to rename the library.

    I was not able to simply rename the file. "readelf -d" still says my application links against "" and it doesn't find the library without version suffix. How to rename a library probably (or in the sense of this documentation)?

    Thanks for helping.
    Last edited by Infinity; 20th August 2014 at 23:39.

Similar Threads

  1. Deploying desktop application on android
    By Baso in forum Installation and Deployment
    Replies: 0
    Last Post: 3rd December 2013, 18:08
  2. Deploying an app with additional library
    By kornicameister in forum Qt Programming
    Replies: 8
    Last Post: 10th July 2011, 15:51
  3. [QTabWidget] Adding additional button
    By winuser in forum Newbie
    Replies: 1
    Last Post: 3rd December 2010, 12:56
  4. Deploying applications with new Qt libraries
    By Luc4 in forum Qt Programming
    Replies: 0
    Last Post: 24th June 2010, 22:31
  5. Replies: 2
    Last Post: 17th April 2010, 16:40

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.