Android program error solution: c ++ _ static error

Source: Internet
Author: User

Android program error solution: c ++ _ static error

Recently upgraded to the official version of Cocos2d-x 3.2, iOS program compilation is no problem, the Results Use cocos compile-p android compiler to generate the APK program, the results of the tragedy, the following error occurs.

Android NDK: Invalid APP_STL value: c ++ _ static

Android NDK: Please use one of the following instead: system stlport_static 1_stlport_shared 1_gnustl_static gnustl_shared gabi ++ _ static gabi ++ _ shared libc ++ _ static libc ++ _ shared none

Make: Entering directory '/game/physics_engine/proj. android'

/Sdk/ndk/android-ndk-r9c/build/core/add-application.mk: 274: *** Android NDK: Aborting. Stop.

Make: Leaving directory '/game/physics_engine/proj. android'

Error running command, return code: 2

Obviously, this error is caused by incorrect STL Library. There are two solutions.

Solution 1: temporary solution

Modify the Application. mk file and replace the first four lines with the following content. Then replace it with OK.

The original content is as follows:

APP_STL: = c ++ _ static

NDK_TOOLCHAIN_VERSION = clang

APP_CPPFLAGS: =-frtti-DCC_ENABLE_CHIPMUNK_INTEGRATION = 1-std = c ++ 11-fsigned-char

APP_LDFLAGS: =-latomic

The content after replacement is as follows:

APP_STL: = gnustl_static

APP_CPPFLAGS: =-frtti-DCOCOS2D_DEBUG = 1-std = c ++ 11-Wno-literal-suffix-fsigned-char

Solution 2:

C ++ _ static is only available in the latest NDK, so you can download the latest NDK.


Too bad !!! Cocos2dx 3.2, Miss cocos2dx3.1.1 ~


Don't understand can add my QQ group: 239982941 (cocos2d-x 3. x Learning Group) Welcome to your arrival Oh, read the blog to some footprints Bai, thank you ~~


Related Article

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.