-1

我需要在Android.mk.

说我有以下文件

/home/name/android/Android.mk
/home/name/android/lib/share/libfile.so

我应该如何修改Android.mk

4

2 回答 2

0

它似乎

LOCAL_LDLIBS = -L$(LOCAL_PATH)lib/share -lfile

你可以试试看

于 2012-08-29T08:10:50.217 回答
0

我不太明白你的问题,但我希望这是你所要求的,这个 Android make 文件包括静态预建库。

include $(CLEAR_VARS)
LOCAL_MODULE    := mylib
LOCAL_SRC_FILES := mylib.a
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)

include $(PREBUILT_STATIC_LIBRARY)

include $(CLEAR_VARS)
LOCAL_MODULE    := NativeLib
LOCAL_SRC_FILES := myfile.c

LOCAL_C_INCLUDES := myfile.h


LOCAL_LDLIBS := -llog
LOCAL_STATIC_LIBRARIES := mylib

include $(BUILD_SHARED_LIBRARY)

要包含动态库,您可以修改为 PREBUILT_DYNAMIC_LIBRARY

于 2012-08-29T08:11:15.243 回答