Android device can not look up any function calls to a dynamic library built with Qt
-
Hi,
i have library built with Qt. The library contains an interface 'MyIntf' class that maps call to convenient functios.
The library is compiled for an armv7 device using Qt Creator 3.0 and google ndk 9.
The built proceeds without errors.
Now I have an android project that needs to interact with the library.
Therefore my Android root directory which has a lib directory where the library and qt related libraries are stored.
Next i have an jni directory which contains an Android.mk and an Application.mk and a cpp file for the jni interface.
The header file contains
@
#include <jni.h>
#include "MyIntf.h"MyIntf intf;
JNIEXPORT jstring JNICALL Java_package_TestClass_Test
(JNIEnv* env, jobject);
@and the cpp file contains the implementation
@JNIEXPORT jint JNICALL Java_package_TestClass_Test
(JNIEnv* env, jobject) {
return intf.test();
}
@Building the jni library jniIntf.so using ndk-build works fine.
In my Java Application i have a static code block loading all the required qt libraries then my own prebuilt qt custom library and finally jniIntf.so but then the following error occurs:
@
dlopen("/data/app-lib/package.jartest-1/jniIntf.so") failed: Cannot load library: soinfo_relocate(linker.cpp:976): cannot locate symbol "_ZN9myNamespace10myIntf9TestESs
@I don't know why the names can not be looked up, since loading the prebuilt library works, just the jni library throws an error.
Any ideas?
Regards!
-
to the top