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
posted @ 2012-09-17 01:39  居家懒人  阅读(3561)  评论(0编辑  收藏  举报