In my Android.mk.
there is a definition for LOCAL_SRC_FILES where each of the cpp file are listed.
CPP_FILES := $(shell find $(LOCAL_PATH)/../../Classes -name *.cpp)
LOCAL_SRC_FILES := hellocpp/main.cpp
LOCAL_SRC_FILES += $(CPP_FILES:$(LOCAL_PATH)/%=%)
H_FILES := $(shell find $(LOCAL_PATH)/../../Classes -name *.h)
LOCAL_C_INCLUDES += $(H_FILES:$(LOCAL_PATH)/%=%)
But build fail. I get errors:
jni/hellocpp/main.cpp:1:25: fatal error: AppDelegate.h: No such file or directory
#include "AppDelegate.h"
^
compilation terminated.
make: *** [obj/local/armeabi/objs-debug/cocos2dcpp_shared/hellocpp/main.o] Error 1
make: *** Waiting for unfinished jobs....
jni/../../Classes/AppDelegate.cpp:2:26: fatal error: LoadingScene.h: No such file or directory
#include "LoadingScene.h"
^
compilation terminated.
I also try add manual:
LOCAL_SRC_FILES := hellocpp/main.cpp \
hellocpp/myclass.cpp \
hellocpp/mynextclass.cpp \
../../Classes/Screens/LaunchScreen.cpp \
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../Classes \
$(LOCAL_PATH)/../../Data \
$(LOCAL_PATH)/../../Road \
$(LOCAL_PATH)/../../etc_dir \
$(LOCAL_PATH)/../../Screens
But I still get same error. Someone can tell me why and how to fix it. Thank you so much.
