![]() In a word, you shoud use one of these option combos: The reason: your code is using C++ exception mechanism which compiler automatically generate try/catch/finally block hidden code which in turn call _cxa_end_cleanup somewhere.Īnother way to resolve this problem is add -fno-exceptions option to gcc which obviously means disable exception handler mechanism.īTW, you should also add -fno-rtti to avoid other maybe-encountered compilation error, this is becauseĪll android's C++ class is compiled without dynamic type info in class memory layout. You can fix this problem by adding the compiler option -lsupc++. In Android's Application.mk this would be: APP_CPPFLAGS := -frtti Take a look here: Linux C++: Linker is outputting strange errors. This stops my linker errors (and pushes the build onto a new set of errors :)) ![]() Tags : android,compiler-errors,android-ndk,linker-errorsĪfter reading android-ndk/docs/CPLUSPLUS-SUPPORT.html I found that there a couple more libraries that I can link to: C++ C++ Standard Is there another library available to the NDK? To my knowledge there are only three I can choose from ( stlport_static, stlport_shared, system) as set by APP_STL := stlport_static in Application.mk. This is caused because I don't have access to the correct STL. obj/local/armeabi/objs/jniWrapper/native.o: In function `basic_string ': D:/opt/android-ndk/sources/cxx-stl/stlport/stlport/stl/_string.c: 643: undefined reference to `_cxa_end_cleanup ' text._ZNSt4priv12_String_baseIcSaIcEED2Ev+ 0x0): undefined reference to `_gxx_personality_v0 ' obj/local/armeabi/objs/jniWrapper/native.o:(.ARM.extab. obj/local/armeabi/objs/jniWrapper/native.o: In function `std::_node_alloc::deallocate(void*, unsigned int) ': D:/opt/android-ndk/sources/cxx-stl/stlport/stlport/stl/_alloc.h: 161: undefined reference to `_cxa_end_cleanup ' text._ZNSt6vectorIhSaIhEEC1ERKS1_+ 0x0): undefined reference to `_gxx_personality_v0 ' obj/local/armeabi/objs/jniWrapper/native.o: In function `_Vector_base ': D:/opt/android-ndk/sources/cxx-stl/stlport/stlport/stl/_vector.h: 73: undefined reference to `_cxa_end_cleanup ' I'm getting this output after adding in a set of code from a colleague.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |