在我的Android.mk文件中,我有如下内容
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := testmodule
FILE_LIST := $(LOCAL_PATH)/include/md5/md5.с
FILE_LIST += $(LOCAL_PATH)/include/md5/md5main.с
FILE_LIST += $(wildcard $(LOCAL_PATH)/include/*.cpp)
LOCAL_SRC_FILES := $(FILE_LIST:$(LOCAL_PATH)/%=%)
include $(BUILD_SHARED_LIBRARY)
但是当我运行ndk-build
时,我得到了以下错误
Android NDK: WARNING: Unsupported source file extensions in /Users/some/path/jni/Android.mk for module testmodule
Android NDK: include/md5/md5.с include/md5/md5main.с
(我在OSX 10.9.2上使用android-ndk-r8c )
如何将*.c文件添加到Android.mk?我能做错什么呢?
(如果需要,我可以发布更多的Android.mk和Application.mk )
发布于 2015-08-07 17:05:54
从评论中移出答案,就像@greenapps所说的那样:
You could rename them to .cpp and if that is not possible
create a .cpp file in which you include both .c files.
https://stackoverflow.com/questions/25767762
复制相似问题