views:

144

answers:

3

Hi.

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?

+2  A: 

-fexception is a compiler switch. How you use it depends on your compiler setup. What compiler are you using? IDE? build tool?

EricSchaefer
NDK with cygwin. All I did was to type "make APP=project" at cygwin in the directory of ndk folder.
Gidiyo
There should be a Makefile in this directory. This controls how everything is compiled. That's the place to look for compiler switches.
EricSchaefer
+2  A: 

In the compiler flags add -fexception in your Makefile.

DumbCoder
Did that ever worked? With this you'll have -fno-exceptions along with -fexceptions.
ognian
A: 

Hi,

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.

ognian