![]() ![]() I really would like to see a simple tutorial which explains how to build a JNI app (with JAVA + c++ code) that uses an external library written in C++ and placed in another directory (not the jni directory of the app). If i use, instead, BUILD_STATIC_LIBRARY, no. If i use BUILD_SHARED_LIBRARY, i got libmylib.so as usual. The Android.mk of mylib is: LOCAL_PATH := $(call my-dir) I would like to know how can to force the linker to produce a libhelloworld.so merged with libmylib.so, so to avoid 1,2 and 3 as mentioned above. If i do 1 and 2, the app works perfectly (tested both on the emulator and on a real device). System.loadLibrary("ndkfoo") ), otherwise the app crashes. in the java code, i have to load explicitly mylib with System.loadLibrary and i have to load mylib BEFORE i load helloworld library (that is: System.loadLibrary("mylib").libmylib.so is not merged with libhelloworld.so, so i have to copy libmylib.so into the directory helloworld/libs/armeabi manually.I am able to compile helloworld, telling the linker to look for libmylib.so. hpp files of mylib and have to be linked with libmylib.so. I have a simple app called helloworld that includes the. The resulting library file is called libmylib.so. I have a C++ lib called mylib, compiled with ndk-build of Android NDK r6b under CYGWIN. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |