jbeder / yaml-cpp

A YAML parser and emitter in C++
MIT License
4.91k stars 1.78k forks source link

yaml-cpp 0.7.0, android ndk, can`t catch exception #1206

Closed crazyzidane closed 11 months ago

crazyzidane commented 11 months ago

yaml-cpp, version, 0.7.0,

I built it with android ndk and run it in Android, but I can`t catch the exception successfully, it will abort when error occurred. I add "LOCAL_CPPFLAGS += -fexceptions" in Android.mk.

crazyzidane commented 11 months ago

I got it, because when I run the yaml-cpp, I use the default Android system libc++_shared.so in /system/lib64, which is different with ndk libc++ library. I use adb pushed the ndk libc++_shared.so to android with yaml-cpp, after I set "export LD_LIBRARY_PATH=$(pwd)", then run yaml-cpp, it`s ok, can catch the exception successfully.

crazyzidane commented 11 months ago

have solved it, refer to the last comment.