Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android NDK assert.h problems

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.

If there is some android specific one assert.h?

Or i just do something wrong?

like image 746
Aristarhys Avatar asked Feb 04 '12 11:02

Aristarhys


1 Answers

If you want to compile your code with asserts then you can do it in three ways:

  • use NDK_DEBUG=1 argument in ndk-build commandline
  • add android:debuggable="true" to < application > tag in AndroidManifest.xml
  • add APP_OPTIM := debug to your Application.mk file - this will also disable optimizations and will compile with debug symbols
like image 136
Mārtiņš Možeiko Avatar answered Sep 22 '22 12:09

Mārtiņš Možeiko