Android.mk:C文件不支持的源文件扩展名

时间:2014-09-10 14:15:59

标签: android c android-ndk

在我的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)

如何在Android.mk中添加* .c文件?我能做错什么?

(如果需要,我可以发布更多Android.mk和Application.mk)

1 个答案:

答案 0 :(得分:0)

只是为了从评论中移出答案,就像@greenapps说的那样有效:

You could rename them to .cpp and if that is not possible
create a .cpp file in which you include both .c files.
相关问题