cocos2dx添加新的类后出现错误undefined reference to的解决办法
2016-08-09 11:44
513 查看
使用cocos compile -p android编译cocos2dx项目的时候出现如下错误(新建了TestScene.h,TestScene.cpp):
编辑proj.android/jni/目录下的Android.mk文件,在
处追加上你所有新建的文件(我这里是TestScene.cpp),重新编译,通过。
jni/../../Classes/AppDelegate.cpp:79: error: undefined reference to 'TestScene::createScene()' clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation) make.exe: *** [obj/local/armeabi/libMyGame.so] Error 1 make.exe: Leaving directory `D:/projects/HelloWorldCpp/proj.android' 执行命令出错,返回值:2。
编辑proj.android/jni/目录下的Android.mk文件,在
LOCAL_SRC_FILES := hellocpp/main.cpp \ ../../Classes/AppDelegate.cpp \ ../../Classes/HelloWorldScene.cpp
处追加上你所有新建的文件(我这里是TestScene.cpp),重新编译,通过。
相关文章推荐
- GCC编译uboot出现(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'错误的解决办法
- 使用Sqlite出现undefined reference to `sqlite3_open'错误的解决
- undefined reference to `__gnu_mcount_nc'的解决 在编译内核时出现了如下错误:
- 编译Ralink SDK时碰到的奇怪错误(undefined reference to `main')的解决办法
- undefined reference to `clock_gettime'编译错误的解决办法
- 移植uip-0.9到u-boot中出现undefined reference to `strstr'错误的解决过程
- 编译QT时出现lib/libQtGui.so: undefined reference to `ts_read_raw'的解决办法
- 编译出现"undefined reference to `GTK_WIDGET_REALIZED',`GTK_WIDGET_VISIBLE' "相关错误的解决方法
- 当在一个siliverlight 2.0工程中 添加webservice时 遇到错误:'Object reference not set to an instance of an object' 解决办法
- vs数据库访问出现Object reference not set to an instance of an object. 错误解决办法
- PHP 5.3.10 编译安装时出现 undefined reference to `libiconv' 错误的解决方法
- 编译WU FTPD出现"undefined reference to crypt"错误解决方法
- 编译Ralink SDK时碰到的奇怪错误(undefined reference to `main')的解决办法
- 编译Ralink SDK时碰到的奇怪错误(undefined reference to `main')的解决办法
- 出现undefined reference to `forkpty' 错误解决方法
- Linux下安装Coreseek提示“/src/sphinx.cpp:22292: undefined reference to”错误的解决办法
- 添加自己编写的模块到ns-3中出现undefined reference to问题的解决
- arm编译QT4.8.5时出现lib/libQtGui.so: undefined reference to `ts_read_raw'的解决办法
- error:undefined reference to `coloured_LED_init'及相关错误时的解决办法!
- Silverlight添加服务引用Service Reference, 出现“自定义工具错误,无法生成服务引用”错误的解决办法