Android NDK exception handling

I'm trying to figure out support for exception handling when 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 , I realized that exception handling C ++ is added for NDK> r5 versions, only for the included gnustl runtime. However, does the NDK support C ++ STL? If so, does it also support STL exception handling? Any comments on this?

+4
source share
2 answers

Android NDK provides support for the GNU STL library and C ++ exception handling. To link to the GNU STL and enable exception handling, put these lines in your Application.mk file:

 APP_STL := gnustl_static APP_CPPFLAGS += -fexceptions 
+5
source

Yes, the exceptions that NDK supports are STL exceptions.

+2
source

Source: https://habr.com/ru/post/1493722/


All Articles