我有一些兩個共享庫和標題爲他們。 我想使用前兩個庫中的函數構建第三個共享庫。 我認爲makefile有問題。當我嘗試建立收到此:我的項目建立共享庫鏈接到其他不標準共享libarary
Android NDK: /cygdrive/d/.../jni/Android.mk: Cannot find module with tag 'shared1' in import path Android NDK: Are you sure your NDK_MODULE_PATH variable is properly defined ? Android NDK: The following directories were searched: Android NDK: /cygdrive/d/.../jni/Android.mk:36: *** Android NDK: Aborting. . Stop.
結構:
jni/ - myfile.c - Android.mk jni/dec/ - lot of header files jni/enc/ - lot of header files libs/armeabi/ - shared1.so - shared2.so
也Android.mk SOURSE:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/dec \
$(LOCAL_PATH)/enc
LOCAL_SHARED_LIBRARIES := shared1 shared2
LOCAL_MODULE := mylib
LOCAL_SRC_FILES := myfile.c
LOCAL_LDLIBS += -lOpenSLES
LOCAL_LDLIBS += -llog
LOCAL_LDLIBS += -landroid
include $(BUILD_SHARED_LIBRARY)
$(call import-module, shared1)
$(call import-module, shared2)
被盜從此非常感謝 – xitx 2012-03-01 17:13:44