标签:
LOCAL_SRC_FILES := hellocpp/main.cpp \
../../Classes/AppDelegate.cpp \
../../Classes/HelloWorldScene.cpp
只要把上面这些替换成下面的:
SRC_FILES := hellocpp/main.cpp
SRC_FILES += $(wildcard $(LOCAL_PATH)/../../Classes/*.cpp)
SRC_FILES += $(wildcard $(LOCAL_PATH)/../../Classes/*/*.cpp)
SRC_FILES += $(wildcard $(LOCAL_PATH)/../../Classes/*/*/*.cpp)
SRC_FILES += $(wildcard $(LOCAL_PATH)/../../Classes/*/*/*/*.cpp)
LOCAL_SRC_FILES := $(SRC_FILES:$(LOCAL_PATH)/%=%)
就搞定了 以后你就放心的写cpp去吧,再也不用每次就手写导入了
cocos2d-x项目中如何避免增加一个cpp就必须在工程android.mk文件去添加引用
标签:
原文地址:http://www.cnblogs.com/Colored-Mr/p/4721073.html