如何Android.mk自己去寻找Classes下的.cpp文件
LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_CPPFLAGS += -fexceptions LOCAL_MODULE := cocos2dcpp_shared LOCAL_MODULE_FILENAME := libcocos2dcpp define walk $(wildcard $(1)) $(foreach e,$(wildcard $(1)/*),$(call walk,$(e))) endef ALLFILES = $(call walk,$(LOCAL_PATH)/../../Classes) FILE_LIST := hellocpp/main.cpp FILE_LIST += $(filter %.cpp,$(ALLFILES)) FILE_INCLUDES := $(shell find $(LOCAL_PATH)/../../Classes -type d) LOCAL_SRC_FILES := $(FILE_LIST:$(LOCAL_PATH)/%=%) LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../Classes LOCAL_WHOLE_STATIC_LIBRARIES := cocos2dx_static LOCAL_WHOLE_STATIC_LIBRARIES += cocosdenshion_static LOCAL_WHOLE_STATIC_LIBRARIES += Box2d_static include $(BUILD_SHARED_LIBRARY) $(call import-module,2d) $(call import-module,audio/android) $(call import-module,Box2D)
在导入cocos-ext.h时不能写成 #include "cocos-ext.h" 而是要写成 #include "extensions/cocos-ext.h"