Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android NDK exception handling

I'm trying to figure out the support for exception handling while writing NDK based libraries. From these links: http://developer.android.com/tools/sdk/ndk/index.html and http://www.kandroid.org/ndk/docs/CPLUSPLUS-SUPPORT.html, what I could understand is that C++ exception handling is added for NDK revisions > r5, only for enabled "gnustl" runtime. However, does NDK have support for C++ STL? If so, does it support STL exceptions handling as well? Any comments on this?

like image 637
pree Avatar asked Mar 23 '23 00:03

pree


1 Answers

Android NDK provides support of GNU STL library and C++ exceptions handling. To link against GNU STL and enable exceptions handling put these lines into your Application.mk file:

APP_STL := gnustl_static
APP_CPPFLAGS += -fexceptions
like image 72
Sergey K. Avatar answered Mar 31 '23 21:03

Sergey K.