zoukankan      html  css  js  c++  java
  • 使用Eclipse调试Android Native Application---cocos2d-x + Eclipse + Android + ndk

    纠结很多天的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了,  被这一个乌龙困惑了好几天。。。    记录下。

  • 相关阅读:
    Servlet接口实现类开发步骤
    Servlet概述
    Web服务器之HTTP协议与Tomcat服务器
    vant中van-picker选项插入图片
    排序算法-插入排序
    排序算法-快速排序
    排序算法-冒泡排序
    浅谈C#中Dictionary的实现。
    设计模式(23)-备忘录模式
    设计模式(22)-访问者模式
  • 原文地址:https://www.cnblogs.com/porter/p/3643876.html
Copyright © 2011-2022 走看看