gpt4 book ai didi

android - std::string 操作(即 stol、stoi)未找到 NDK8d

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:37:31 26 4
gpt4 key购买 nike

我尝试使用支持 c++11 的 ndk r8d 设置我的第一个 android 项目。一些 c+11 机制工作正常(即 lambada 表达式),但是当我尝试使用新的字符串操作之一,编译失败(错误:“stol”不是“std”的成员)。这是我的项目设置:

应用程序.mk

APP_MODULES := MyLib   

APP_CPPFLAGS := -std=gnu++0x
APP_CPPFLAGS += -frtti
APP_CPPFLAGS += -fexceptions
APP_CPPFLAGS += -DDEBUG

APP_ABI := armeabi-v7a
APP_PLATFORM:=android-14

APP_STL := gnustl_static
APP_GNUSTL_CPP_FEATURES := rtti exceptions

NDK_TOOLCHAIN_VERSION=4.7

这些功能真的不起作用吗?

最佳答案

似乎在another thread中得到了回答.

The reason why you cannot use the functions is quite deep rooted, and unfortunately currently unsolvable.

在 GNU STL 中,这些函数的实现以某种方式依赖于 c99(_GLIBCXX_USE_C99 宏),Android 不使用它

The root cause seems to be that the C99 functionality usage has been disabled in the GNU stdlibc++ on the armeabi-v7a platform due to the fact the the Bionic libc does not support complex math (the standard C library on Android is Bionic).

关于android - std::string 操作(即 stol、stoi)未找到 NDK8d,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15499070/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com