Hi,
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 (http://qt-project.org/doc/qt-5/qtsen...e-example.html) worked fine. I think the Android version of Qt is configured well.
Now I'm trying to link against OpenSSL:
Compilation seems to work, but deploying fails.Qt Code:
LIBS += -L/opt/android-openssl/usr/lib/ -lcrypto INCLUDEPATH += /opt/android-openssl/usr/include ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android ANDROID_EXTRA_LIBS += /opt/android-openssl/usr/lib/libcrypto.so.1.0.0To copy to clipboard, switch view to plain text mode
I'm getting a clear error message:
Simply renaming the file does not work of course since my program links against "libcrypto.so.1.0.0" and doesn't find a file "libcrypto.so". But I'm only able to deploy a file named "libcrypto.so". That's the problem.The file name of external library /opt/android-openssl/usr/lib/libcrypto.so.1.0.0 must begin with "lib" and end with the suffix ".so".
How can I walk around the problem?
Can I try to get a file called "libcrypto.so" without version suffix? Here's the script I'm using to build OpenSSL: PKGBUILD.sh
(I simply modified the script from the Arch repository: https://www.archlinux.org/packages/core/x86_64/openssl/)
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:
(http://wiki.openssl.org/index.php/Android#Miscellaneous)Specify the full library name when calling Java's System.load. That is, call System.load(“libcrypto.so.1.0.0â€). 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 "libcrypto.so.1.0.0" 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.
Bookmarks