SQLCipher static linking against another lib for Android


Hi, i’m trying to integrate SQLCipher into linphone-core for Android (linphone-core is a library not an Android app).
I tried to compile the sqlcipher for Android statically, in the jni/Android.mk replaced:

Compiled sqlcipher for android, was successful, the ‘.a’ files were on ‘obj’ directory

But when I compile the linphone-core (armeabi) with the libsqlcipher replacing the libsqlite3 it gives me errors linking:
[ 1%] Linking CXX shared library liblinphone-armeabi.so
/opt/android_studio/android-database-sqlcipher/jni/…/external/sqlcipher/sqlite3.c:18296: error: undefined reference to ‘RAND_add’
/opt/android_studio/android-database-sqlcipher/jni/…/external/sqlcipher/sqlite3.c:18460: error: undefined reference to ‘EVP_sha1’
/opt/android_studio/android-database-sqlcipher/jni/…/external/sqlcipher/sqlite3.c:18460: error: undefined reference to ‘EVP_MD_size’
/opt/android_studio/android-database-sqlcipher/jni/…/external/sqlcipher/sqlite3.c:18456: error: undefined reference

My guess is that it didn’t statically link the libcrypto.a to libsqlcipher.a

So my question is how can I statically compile libsqlcipher for the various android archs with libcrypto statically linked ?
Am I missing something here regarding compiling sqlcipher statically ?

Thanks for any help.


Hello @artur

This sounds like a very specific build configuration issue. We only provide free, public support to our standard community distributions. If your organization is interested in advanced support agreement to provide further assistance with your build, please feel free to contact us at support@zetetic.net. Thanks!