error: exception handling disabled, use -fexceptions to enable

转自:http://drovik.com/html/8410924155.html 

问题来源:

 

android平台移植过程中,在用NDK编译文件时出现error: exception handling disabled, use -fexceptions to enable。

 

问题解决:

此问题的出现是编译器的异常异常捕获被禁用了,需要在Android.mk文件中开启。在Android.mk文件中添加: LOCAL_CPPFLAGS += -fexceptions就可以了。或者在Application.mk文件中添加APP_CPPFLAGS += -fexceptions
也是可以的。

猜你喜欢

转载自rudolph.iteye.com/blog/1881667
今日推荐