转载自 居家懒人 http://www.cnblogs.com/JD85/archive/2012/09/17/2688128.html
加入写了新场景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'
时间: 2024-10-05 05:06:02