Hi All,
I am beginer to learn NDK to support C code to Android,
Can anybody help to explain how to fix the problem below:
1. I am implemented 2 shared library and use these to JNI code to let android can call, i am using NDK to build, it succeed.
2. I run the android app, it failed to load library, the problem seems it can not find other library that linked at build time. I have copied these library to same folder with main lib (JNI implement lib /data/data/com.learn/lib/*.so) but it still fail, and i am trying to copy to /system/lib but it can not since i see all others .so are placed at this folder.
So my question is that:
1. where to put so files to let app can load by using System.load or System.loadLibrary
2. If i use static lib then it is OK, but based on two-libs example i don't see how we load from an built static lib as .a so can you tell me how to link to file .a (static lib) from config make file?
3. Can android work with other so file that built from linux OS with gcc or other compiler? or it should just work so, or .a file that built from NDK?
Thank in advance!
I am beginer to learn NDK to support C code to Android,
Can anybody help to explain how to fix the problem below:
1. I am implemented 2 shared library and use these to JNI code to let android can call, i am using NDK to build, it succeed.
2. I run the android app, it failed to load library, the problem seems it can not find other library that linked at build time. I have copied these library to same folder with main lib (JNI implement lib /data/data/com.learn/lib/*.so) but it still fail, and i am trying to copy to /system/lib but it can not since i see all others .so are placed at this folder.
So my question is that:
1. where to put so files to let app can load by using System.load or System.loadLibrary
2. If i use static lib then it is OK, but based on two-libs example i don't see how we load from an built static lib as .a so can you tell me how to link to file .a (static lib) from config make file?
3. Can android work with other so file that built from linux OS with gcc or other compiler? or it should just work so, or .a file that built from NDK?
Thank in advance!