Hi All,

   I have countered a error "Cannot find library" when with dlopen in
android arm device.

   Blow is my android.mk
   android.mk for dynamic lib
---------------------------------------------------------------
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)

LOCAL_SRC_FILES := \
        c_src/mydll.c

LOCAL_CFLAGS += -DANDROID
LOCAL_C_INCLUDES += \
        $(LOCAL_PATH)/hdr


LOCAL_PRELINK_MODULE := false
LOCAL_SHARED_LIBRARIES := libc

LOCAL_LDLIBS += -lpthread


LOCAL_MODULE:= libmydll

include $(BUILD_SHARED_LIBRARY)


   android.mk for test app
-------------------------------------------------------------
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)

LOCAL_SRC_FILES := \
        c_src/mymain.c


LOCAL_CFLAGS += -DANDROID
LOCAL_C_INCLUDES += \
        $(LOCAL_PATH)/hdr

LOCAL_PRELINK_MODULE := false

LOCAL_SHARED_LIBRARIES := libc

LOCAL_MODULE:= mytest

include $(BUILD_EXECUTABLE)

and in mymainc.c
it just simply call dlopen() as below:

 pLibHandle = dlopen(libmydll.so, RTLD_NOW);

But get the error "Cannot find library". I have checked the
libmydll.so already in system/lib.
Could anyone help me out? Thanks

Best Regards
Guoyin Chen



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to