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:
include (BUILD_SHARED_LIBRARY)
with
include (BUILD_STATIC_LIBRARY)
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.