Archived Forum Post

Index of archived forum posts


error: undefined reference to '__gxx_personality_v0' and '__cxa_end_cleanup'

May 07 '14 at 08:52

Our engineer is tring to build our Android JNI sources with your SMIME library.

However, we are getting these link errors:

libchilkatAndroid.a(C_CkEmail.o): in function CkEmail_Create:C_CkEmail.cpp(.text.CkEmail_Create+0x18): error: undefined reference to '__cxa_end_cleanup'

libchilkatAndroid.a(CkEmail.o):(.ARM.extab.text._ZN7CkEmailC2Ev+0x0): error: undefined reference to '__gxx_personality_v0'


The Chilkat C/C++ libs are written in C++ and therefore need to be linked with the C++ runtime libs, which will resolve external names beginning with "__cxa" and "__gxx". To fix, use "g++" instead of "gcc" for linking. An alternative option is to include a single empty source file having a ".cpp" file extension. For example, create "empty.cpp" which is completely empty and add it to your list of application source files. This should trigger the C++ runtime libs to be linked in.