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

  • 相关阅读:
    Map集合
    Collection的另外一个子类LinkedList&Set集合
    多项式牛顿迭代 学习笔记
    《混凝土数学》第二章 和式 学习笔记
    洛谷P5039 最小生成树 题解
    gdfzoj#236 | 提高组练习题16 Set
    CF979E 题解
    CF1039D 题解
    CF886E 题解
    CF1061C 题解
  • 原文地址:https://www.cnblogs.com/porter/p/3643876.html
Copyright © 2011-2022 走看看