这是指定Android.mk的正确格式吗?是否存在语法错误?我无法找到任何清除此疑问的消息来源。提前感谢你。
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := imageprocessing
LOCAL_SRC_FILES := imageprocessing.c
LOCAL_LDLIBS := -lm -llog -ljnigraphics
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libfreeimage
LOCAL_SRC_FILES := libfreeimage.so
include $(PREBUILT_SHARED_LIBRARY)
并且在C代码中有
#include <android/libfreeimage.h>
答案 0 :(得分:2)
因为你要从现有的共享库创建一个共享库:所以你需要首先给出预先构建的共享库部分,然后你可以创建自己的库。所以你的代码应该是这样的:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := libfreeimage
LOCAL_SRC_FILES := libfreeimage.so
include $(PREBUILT_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := imageprocessing
LOCAL_SRC_FILES := imageprocessing.c
LOCAL_LDLIBS := -lm -llog -ljnigraphics
include $(BUILD_SHARED_LIBRARY)
答案 1 :(得分:1)
那么, 我得到了解决方案 http://www.kandroid.org/ndk/docs/PREBUILTS.html 感谢您宝贵的时间Subrat nayak,非常感谢