Android NDK r10:std::string尚未声明
Android NDK r10: std::string has not been declared
我的android ndk r10有问题。我得到以下信息:std::string尚未声明。我看了其他论坛的帖子,但没有一个对我有帮助。我的Application.mk看起来是这样的:
APP_PLATFORM := android-14
APP_ABI := armeabi-v7a # build for the ARM version of MCPE
APP_CFLAGS := -O2 -std=gnu99 # optimization level 2, use C99 (for decleations in for loops, etc)
APP_CPPFLAGS := -std=c++11
LOCAL_CFLAGS := -std=c++11
APP_STL := stlport_static
请帮帮我!
类std::string尚未声明,因为它不存在。不幸的是,NDK中没有std::字符串。std::string的一些端口存在,我记得我找到了一两个,但最终我决定不使用std::字符串。为什么?因为我们已经有了Java字符串和C字符串,Java字符串来自JNI调用,C字符串来自文件,如果你再引入一种字符串类型,那将是更多的转换而不是使用。
编辑:但请阅读下面的评论。
相关文章:
- #ifdef和未声明的标识符
- 未声明的标识符编译暗黑破坏神 2 程序"muleview"
- 在顶点着色器中使用 OpenGl 的未声明标识符,我在顶点着色器中绘制三角形时遇到问题
- Google protobuf 时间戳未声明标识符,在 Windows 上具有C++
- 在气泡排序程序中未声明错误功能
- 我在范围内未声明的错误类有问题
- 使用未声明的标识符"sqrt"?
- 我包含了<winuser.h>,但编译器在MonitorFromWindow上抛出"未声明"
- 对类 (C++) 中的私有变量使用未声明的标识符
- 我的代码中有错误,未声明的标识符
- 未定义的标识符/未声明
- 错误:在 C++ 'std'使用未声明的标识符
- 在编译器之前检测未声明的标识符
- 使用未声明的标识符'temp'
- 使用未声明的标识符"yylex"和"yyin"?
- 使用"class"关键字,后跟未声明的标识符
- 未声明的标识符错误,但变量定义正确 (?)
- C2065 'cout':未声明的标识符
- 在此范围内未声明错误"Clreol"
- C++模板模板参数中未声明的标识符