Search code examples
androidc++makefilecmakeandroid-ndk

Enable Exception C++


I am trying to make APP native code for Android. The Native code is in cplusplus. Whenever I try to make, the following error appears.

H236Plus.cpp:135: error: exception handling disabled, use -fexceptions to enable

How do I use -fexceptions to enable exception handling, and where do i use it?


Solution

  • You need to build with CrystaX's custom NDK. It has full libstdc++, RTTI and exceptions support. It's generally the best tool for Android development I know.