Hi all, [1]
I have built a c++ shared library (.so) using code sourcery toolchain. (libhello.so). In android source code, I have created a JNI Wrapper for this from which I have created another shred library "libhello-jni.so". The JNI Android.mk (native.cpp + libhello.so) = libhello-jni.so I have a sample Java application which loads the libhello-jni.so. However when I launch my apk (java application) I get an error - unknown reloc type 19 --------------------------------------------------------------------------------------------- LogCat Output --------------------------------------------------------------------------------------------- D/dalvikvm( 1084): Trying to load lib /system/lib/libhello-jni.so 0x439068b8 I/dalvikvm( 1084): Unable to dlopen(/system/lib/libhello-jni.so): Cannot load library: link_image[1638]: 877 could not load needed library 'libhello.so' for 'libhello-jni.so' (link_image[1638]: 877 could not load needed library 'libd l.so.2' for 'libhello.so' (link_image[1638]: 877 could not load needed library 'libc.so.6' for 'libdl.so.2' (reloc_library[1288]: 877 unknown reloc type 19 @ 0x80614194 (1179)))) W/dalvikvm( 1084): Exception Ljava/lang/UnsatisfiedLinkError; thrown during Lcom/example/hellojni/Native;.<clinit> --------------------------------------------------------------------------------------------- The libc.so.6 , libdl.so.2 these libraries are present in the system/ lib directory of Android File System. Note: When I use a simple native (without linking to much libraries) code as shared library, I do not get this error. My sample application works fine. [2] The same libhello.so when used with a c++ wrapper and compiled into a executable and launched in Android shell works fine. For this, the required libraries are copied into a directory /usr/lib (/usr/lib is newly created in the Android File System residing on SD card and have copied all the required Code sourcery and other libraries Could anyone point out to me as to why I’m getting the reloc error. Any help highly appreciated. -- unsubscribe: [email protected] website: http://groups.google.com/group/android-porting To unsubscribe from this group, send email to android-porting+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
