@clawoo is right, but you donβt need to include every file you add to the project. Instead, you can do the following and forget about it;)
To avoid updating the file every time a new source file is added to the project, you can use the following script (here: http://www.cocos2d-x.org/boards/6/topics/5321 )
dirs := $(shell find $(LOCAL_PATH) -type d) cppfilestemp1 := $(shell find $(LOCAL_PATH) -type d) cppfilestemp2 := $(shell find $(cppfilestemp1) -name *.cpp) cppfilestemp3 := $(sort $(cppfilestemp2)) cppfiles := $(subst $(LOCAL_PATH)/,,$(cppfilestemp3)) LOCAL_SRC_FILES := \ $(cppfiles)
Remember that if you have files somewhere else, for example:
LOCAL_SRC_FILES := main.cpp \ ../../../Classes/AppDelegate.cpp \ ../../../Classes/HelloWorldScene.cpp \
you can do the following:
cppfilestemp1 := $(shell find $(LOCAL_PATH)/../../../Classes/ -type d)
and
LOCAL_SRC_FILES := main.cpp LOCAL_SRC_FILES += $(cppfiles)
In my case, it worked.
Hint:
If you have problems with the compiler complaining: "There is no rule for creating target /.../," I suggest deleting the contents of the obj / local / armeabi / objs-debug / game_shared folder in Eclipse. Then download build_native.sh and update (F5) the contents of the obj folder.
manicaesar
source share