使用Eclipse调试Android Native Application---cocos2d-x + Eclipse + Android + ndk
2014-04-03 21:19
429 查看
纠结很多天的ndk 调试, 终于在 mac 下面顺利完成(注意在windows还是没弄成功,蛋疼。。。)
调试方法:
1:先google, ndk demo . 把ndk 最基本的hellword 调试通过,网上的例子比较多,没出什么问题, 要注意一点的是,demo 起来的时候,在c++设置断点无效,需要demo 起来后,再用 jni 调c++,断点才有效果, 我这边反正是这样的情况。
2:cocos2d-x 调试, 参考地址:
http://blog.ready4go.com/blog/2013/05/17/how-to-debug-native-c-plus-plus-code-with-eclipse/
和 官网地址: http://www.cocos2d-x.org/wiki/How_to_debug_cocos2d-x_games
--- 让我纠结好几天没有搞清楚的事情,mac 一直报一个错误,结果呢, 网上一查,其他人也遇到了,还说不知道这么解决。让我郁闷了好几天。
错误信息如下:Could not load shared library symbols for 99 libraries, e.g. /system/bin/linker.
Use the "info sharedlibrary" command to see the complete listing.
Do you need "set solib-search-path" or "set sysroot"?
warning: Unable to find dynamic linker breakpoint function.
GDB will retry eventurally. Meanwhile, it is likely
that GDB is unable to debug shared library initializers
or resolve pending breakpoints after dlopen().
其实这不是问题,如果出现上面的信息,也是可以调试的,只不过游戏加载的时候,在c++ 设置断点无效,游戏起来后,再设置断点就OK了, 被这一个乌龙困惑了好几天。。。 记录下。
调试方法:
1:先google, ndk demo . 把ndk 最基本的hellword 调试通过,网上的例子比较多,没出什么问题, 要注意一点的是,demo 起来的时候,在c++设置断点无效,需要demo 起来后,再用 jni 调c++,断点才有效果, 我这边反正是这样的情况。
2:cocos2d-x 调试, 参考地址:
http://blog.ready4go.com/blog/2013/05/17/how-to-debug-native-c-plus-plus-code-with-eclipse/
和 官网地址: http://www.cocos2d-x.org/wiki/How_to_debug_cocos2d-x_games
--- 让我纠结好几天没有搞清楚的事情,mac 一直报一个错误,结果呢, 网上一查,其他人也遇到了,还说不知道这么解决。让我郁闷了好几天。
错误信息如下:Could not load shared library symbols for 99 libraries, e.g. /system/bin/linker.
Use the "info sharedlibrary" command to see the complete listing.
Do you need "set solib-search-path" or "set sysroot"?
warning: Unable to find dynamic linker breakpoint function.
GDB will retry eventurally. Meanwhile, it is likely
that GDB is unable to debug shared library initializers
or resolve pending breakpoints after dlopen().
其实这不是问题,如果出现上面的信息,也是可以调试的,只不过游戏加载的时候,在c++ 设置断点无效,游戏起来后,再设置断点就OK了, 被这一个乌龙困惑了好几天。。。 记录下。
相关文章推荐
- cocos2d-x-2.2 window下配置笔记(ADT+android-ndk-r9b) 无cygwin
- [初探Cocos2d-x]之Mac上搭建Cocos2d-x开发环境
- cocos2dx 3.0rc自定义弹出窗口类
- cocos2d 关于Eclipse 提示 :please define NDK_ROOT的问题(解决Eclipse不会自动编译CPP的问题)
- Cocos2d-JS v3.0 alpha不支持cocos2d-x的Physics integration
- 【Cocos2dx游戏开发】CCTableView实现滑动列表
- 【Cocos2dx游戏开发】CCTableView实现滑动列表
- 从零开始学Cocos2d CCNode节点类
- cocos2d 特效, effect
- 关于cocos2d-x 打包成.exe后 MSVCP110D.dll 丢失问题
- 【Cocos2dx游戏开发】Cocos2d-x简介
- 【Cocos2dx游戏开发】Cocos2d-x简介
- cocos2d-x如何添加box2d物理引擎即常见错误解决
- 【cocos2d-x】TexturePacker 使用心得
- cocos2d-x Touch
- Cocos2d-x 3.0截屏功能集成
- 记录 cocos2dx android遇到的一些注意问题
- cocos2d-x lua
- Cocos2d console使用手册
- cocos2d ipad拍照 比较有参考价值的