login about faq

Hello,

I am building C++ native app using Android SDK 4.1.1 in Ubuntu 13.10 environment. After I added the LOCAL_STATIC_LIBRARIES := libchilkatAndroid line in Android.mk to add Chilkat's static library to my app, I get the following linker errors. I have the lib file in the correct place.

/home/testjb4_1_1-source/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/../lib/gcc/arm-linux-androideabi/4.6.x-google/../../../../arm-linux-androideabi/bin/ld: out/target/product/generic/obj/STATIC_LIBRARIES/libchilkatAndroid_intermediates/libchilkatAndroid.a(CkEmail.o): in function CkEmail::~CkEmail():CkEmail.cpp(.text._ZN7CkEmailD2Ev+0x2e): error: undefined reference to 'cxa_end_cleanup' /home/testjb4_1_1-source/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/../lib/gcc/arm-linux-androideabi/4.6.x-google/../../../../arm-linux-androideabi/bin/ld: out/target/product/generic/obj/STATIC_LIBRARIES/libchilkatAndroid_intermediates/libchilkatAndroid.a(CkEmail.o):(.ARM.extab.text._ZN7CkEmailD2Ev+0x0): error: undefined reference to 'gxx_personality_v0' /home/testjb4_1_1-source/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/../lib/gcc/arm-linux-androideabi/4.6.x-google/../../../../arm-linux-androideabi/bin/ld: out/target/product/generic/obj/STATIC_LIBRARIES/libchilkatAndroid_intermediates/libchilkatAndroid.a(CkEmail.o): in function CkEmail::CkEmail():CkEmail.cpp(.text._ZN7CkEmailC2Ev+0x24): error: undefined reference to 'cxa_end_cleanup' /home/testjb4_1_1-source/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/../lib/gcc/arm-linux-androideabi/4.6.x-google/../../../../arm-linux-androideabi/bin/ld: out/target/product/generic/obj/STATIC_LIBRARIES/libchilkatAndroid_intermediates/libchilkatAndroid.a(CkEmail.o):(.ARM.extab.text._ZN7CkEmailC2Ev+0x0): error: undefined reference to 'gxx_personality_v0' /home/testjb4_1_1-source/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/../lib/gcc/arm-linux-androideabi/4.6.x-google/../../../../arm-linux-androideabi/bin/ld: out/target/product/generic/obj/STATIC_LIBRARIES/libchilkatAndroid_intermediates/libchilkatAndroid.a(CkEmail.o): in function CkEmail::createNew():CkEmail.cpp(.text._ZN7CkEmail9createNewEv+0x1e): error: undefined reference to 'cxa_begin_catch' /home/testjb4_1_1-source/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/../lib/gcc/arm-linux-androideabi/4.6.x-google/../../../../arm-linux-androideabi/bin/ld: out/target/product/generic/obj/STATIC_LIBRARIES/libchilkatAndroid_intermediates/libchilkatAndroid.a(CkEmail.o): in function CkEmail::createNew():CkEmail.cpp(.text._ZN7CkEmail9createNewEv+0x24): error: undefined reference to 'cxa_end_catch' /home/testjb4_1_1-source/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/../lib/gcc/arm-linux-androideabi/4.6.x-google/../../../../arm-linux-androideabi/bin/ld: out/target/product/generic/obj/STATIC_LIBRARIES/libchilkatAndroid_intermediates/libchilkatAndroid.a(CkEmail.o):(.ARM.extab.text._ZN7CkEmail9createNewEv+0x0): error: undefined reference to 'gxx_personality_v0' /home/testjb4_1_1-source/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/../lib/gcc/arm-linux-androideabi/4.6.x-google/../../../../arm-linux-androideabi/bin/ld: out/target/product/generic/obj/STATIC_LIBRARIES/libchilkatAndroid_intermediates/libchilkatAndroid.a(CkEmail.o): in function CkEmail::put_Body(char const*):CkEmail.cpp(.text._ZN7CkEmail8put_BodyEPKc+0x42): error: undefined reference to 'cxa_end_cleanup' /home/testjb4_1_1-source/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/../lib/gcc/arm-linux-androideabi/4.6.x-google/../../../../arm-linux-androideabi/bin/ld: out/target/product/generic/obj/STATIC_LIBRARIES/libchilkatAndroid_intermediates/libchilkatAndroid.a(CkEmail.o):(.ARM.extab.text._ZN7CkEmail8put_BodyEPKc+0x0): error: undefined reference to 'gxx_personality_v0' /home/testjb4_1_1-source/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/../lib/gcc/arm-linux-androideabi/4.6.x-google/../../../../arm-linux-androideabi/bin/ld: out/target/product/generic/obj/STATIC_LIBRARIES/libchilkatAndroid_intermediates/libchilkatAndroid.a(CkEmail.o): in function CkEmail::put_BounceAddress(char const*):CkEmail.cpp(.text._ZN7CkEmail17put_BounceAddressEPKc+0x42): error: undefined reference to 'cxa_end_cleanup' /home/testjb4_1_1-source/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/../lib/gcc/arm-linux-androideabi/4.6.x-google/../../../../arm-linux-androideabi/bin/ld: out/target/product/generic/obj/STATIC_LIBRARIES/libchilkatAndroid_intermediates/libchilkatAndroid.a(CkEmailBundle.o): in function CkEmailBundle::createNew():CkEmailBundle.cpp(.text._ZN13CkEmailBundle9createNewEv+0x1e): error: undefined reference to 'cxa_begin_catch' /home/testjb4_1_1-source/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/../lib/gcc/arm-linux-androideabi/4.6.x-google/../../../../arm-linux-androideabi/bin/ld: out/target/product/generic/obj/STATIC_LIBRARIES/libchilkatAndroid_intermediates/libchilkatAndroid.a(CkEmailBundle.o): in function CkEmailBundle::createNew():CkEmailBundle.cpp(.text._ZN13CkEmailBundle9createNewEv+0x24): error: undefined reference to 'cxa_end_catch' /home/testjb4_1_1-source/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/../lib/gcc/arm-linux-androideabi/4.6.x-google/../../../../arm-linux-androideabi/bin/ld: out/target/product/generic/obj/STATIC_LIBRARIES/libchilkatAndroid_intermediates/libchilkatAndroid.a(CkMailMan.o): in function CkMailMan::createNew():CkMailMan.cpp(.text._ZN9CkMailMan9createNewEv+0x1e): error: undefined reference to 'cxa_begin_catch' /home/testjb4_1_1-source/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/../lib/gcc/arm-linux-androideabi/4.6.x-google/../../../../arm-linux-androideabi/bin/ld: out/target/product/generic/obj/STATIC_LIBRARIES/libchilkatAndroid_intermediates/libchilkatAndroid.a(CkMailMan.o): in function CkMailMan::createNew():CkMailMan.cpp(.text._ZN9CkMailMan9createNewEv+0x24): error: undefined reference to 'cxa_end_catch' /home/testjb4_1_1-source/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/../lib/gcc/arm-linux-androideabi/4.6.x-google/../../../../arm-linux-androideabi/bin/ld: out/target/product/generic/obj/STATIC_LIBRARIES/libchilkatAndroid_intermediates/libchilkatAndroid.a(CkMultiByteBase.o): in function CkMultiByteBase::nextIdx():CkMultiByteBase.cpp(.text._ZN15CkMultiByteBase7nextIdxEv+0x42): error: undefined reference to 'cxa_begin_catch' /home/testjb4_1_1-source/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/../lib/gcc/arm-linux-androideabi/4.6.x-google/../../../../arm-linux-androideabi/bin/ld: out/target/product/generic/obj/STATIC_LIBRARIES/libchilkatAndroid_intermediates/libchilkatAndroid.a(CkMultiByteBase.o): in function CkMultiByteBase::nextIdx():CkMultiByteBase.cpp(.text._ZN15CkMultiByteBase7nextIdxEv+0x50): error: undefined reference to 'cxa_end_catch'

asked Apr 11 '14 at 10:50

sdeveloper's gravatar image

sdeveloper
1111


Whenever you see unresolved externals beginning with "gxx_" or "cxa_", it's a good sign that what's missing is linking to the C++ runtime libs. Try including an empty C++ source file (such as "empty.cpp") where the file is completely empty, or link using g++ instead.

link

answered Apr 11 '14 at 12:44

chilkat's gravatar image

chilkat ♦♦
11.8k316358421

Ok I added the empty.cpp with the file itself being empty and compiled and still got the same results. I tried using various ways of having the Android.mk file use the g++ compiler instead of the gcc compiler and still to no avail. Could you please post an example of the Android.mk syntax of using this static library using g++ compiler? I tried everything and am still getting the same error above. I'm just using a simple "Hello World" android c++ app to include the Chilkat library to use the mail API.

(Apr 22 '14 at 11:34) sdeveloper
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×65
×45
×17

Asked: Apr 11 '14 at 10:50

Seen: 1,571 times

Last updated: Apr 22 '14 at 11:34

powered by OSQA