Precautions for supporting STL for Android ndk

Source: Internet
Author: User
Android ndk has officially supported STL since r5b, and a crystax version is already supported. Two official versions are supported: GNU and stlport. If you need to use STL in your ndk program, you need to add an option in the application. mk file, that is, app_stl: = stlport_static. App_stl has the following values:
System --> the default minimum supported C ++ Runtime Library
Stlport_static --> Use STL of stlport in the form of static Link
Stlport_shared --> Use STL of stlport version in the form of Dynamic Link
Gnustl_static --> Use STL of GNU version by means of static Link

If you are not using Android like me. MK and application. MK, but use code: blocks or Visual Studio 2010. If you need STL support When configuring the environment, you must specify the STL inclusion path. The link links different versions as needed. Note that stlport supports static link and dynamic link, while GNU only supports static link.

Note that the official stlport version does not support rtti and exceptions. In other words, if you use the stlport version STL, you cannot use the-fexceptions and-frtti compilation options.

Ref: http://www.cppblog.com/kongque/archive/2011/06/29/149781.html

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.