1
我有3個預建的靜態庫,我想在我的共享庫中使用。android-ndk - 使用預建的靜態庫鏈接對方
問題是當ndk-build
試圖鏈接到靜態庫時,我得到了大量未定義的引用。 '未定義的引用'起源於靜態庫試圖調用另一個靜態庫中的方法。例如,tinyNET在tinySAK中調用方法。的依賴是這樣的: tinySAK沒有依賴性 tinyNET取決於tinySAK, tinyHTTP取決於tinyNET和tinySAK
這裏是我的Android.mk的樣子:
LOCAL_PATH := $(call my-dir)
# TINYSAK
include $(CLEAR_VARS)
LOCAL_MODULE := tinySAK
LOCAL_SRC_FILES := libtinySAK_armv7-a.a
include $(PREBUILT_STATIC_LIBRARY)
# TINYNET
include $(CLEAR_VARS)
LOCAL_MODULE := tinyNET
LOCAL_SRC_FILES := libtinyNET_armv7-a.a
include $(PREBUILT_STATIC_LIBRARY)
# TINYHTTP
include $(CLEAR_VARS)
LOCAL_MODULE := tinyHTTP
LOCAL_SRC_FILES := libtinyHTTP_armv7-a.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libtest
LOCAL_SRC_FILES := \
/../../testclient.cpp \
/../../main.cpp \
/../../Webservice.cpp
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../../includes/ \
$(LOCAL_PATH)/../../../doubango/tinyHTTP/include/ \
$(LOCAL_PATH)/../../../doubango/tinySAK/src/ \
$(LOCAL_PATH)/../../../doubango/tinyNET/src/
LOCAL_STATIC_LIBRARIES := tinySAK tinyNET tinyHTTP
include $(BUILD_SHARED_LIBRARY)
我應該怎麼做來解決這個問題?