Why is there a link error such as: Error: Undefined reference to '_ cxa_end_cleanup '?

Source: Internet
Author: User

About Android C ++ support:
Files libstdc ++. * from your Ubuntu are x86 (or x86_64) binaries
Android devices and emulators are arm. Of course, this will not work
Anyway, even if you'll set correct soname. This is very naive way which
Leads nowhere.
Android has very limited support of C ++ meaning there is no exceptions,
Standard C ++ Library (including STL) and rtti. If you need such
Functionality, use my custom ndk distribution from
Http://crystax.net/android/ndk.php-IT support full c ++ features listed

Above.
That is, Android supports C ++ with no exception handling, rtti, and C ++ standard libraries.
However, some people have customized an ndk to fully support this.
Why is there a link error such as: Error: Undefined reference to '_ cxa_end_cleanup. When stlport is used on Android. Because there is no link to libstdc ++.. So an error occurs.

Because some static libraries are used, you must link the complete libstdc ++.. You can
Http://crystax.net/android/ndk.php the downloaded package

Found in the sources \ cxx-STL \ GNU-libstdc ++ \ libs \ armeabi directory.
The libstdc ++ support on Android is limited, so you must link to a complete libstdc ++..
Add the following content to the Android. mk file:
Local_ldflags = $ (local_path)/libs/libcurl. \
$ (Local_path)/libs/libstdc ++.
And local_cppflags + =-lstdc ++ can be compiled.

In this way, C ++ on Android supports C ++ without exception handling, rtti, C ++ standard library STL, and so on.

Exception Handling is supported:
Local_cppflags + =-lstdc ++-fexceptions
STL Library: libstlport.

 

Original text in http://www.bangchui.org/read.php? Tid = 22257

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.