cocos2d-x android 添加新场景报错: undefined reference to `vtable for XXX'



加入写了新场景SecondScene,结果在cpp文件里类名地方报错说undefined reference to `vtable for SecondScene',

很简单,貌似是每个新场景都要先注册一下,找到jni-->Classes目录下的Android.mk文件,在

LOCAL_SRC_FILES := AppDelegate.cpp \
                   HelloWorldScene.cpp

下面加入新创建的场景即可:

LOCAL_SRC_FILES := AppDelegate.cpp \
                   HelloWorldScene.cpp \
                   SecondScene.cpp

你可能感兴趣的:(cocos2d-x android 添加新场景报错: undefined reference to `vtable for XXX')