Android NDK assert.h问题 [英] Android NDK assert.h problems

查看:334
本文介绍了Android NDK assert.h问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

第一个 - 是NDEBUG在某种程度上默认定义的,所以断言不工作,直到你#undef它。

First one - is what NDEBUG somehow already defined by default, so asserts don't work until you #undef it. Second one - they do they work, but i receive no logging in DDMS.

如果有一些android特定的一个assert.h?

If there is some android specific one assert.h?

或者我只是做错了什么?

Or i just do something wrong?

推荐答案

如果你想编译代码


  • 在ndk-build命令行中使用NDK_DEBUG = 1参数

  • 将android:debuggable =true添加到<应用程序>标签

  • 向您的Application.mk文件添加APP_OPTIM:= debug - 这也将禁用优化并将使用调试符号进行编译

这篇关于Android NDK assert.h问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆