安卓NDK : Error: must be enabled with the -std=c++11 or -std=gnu++11 compiler options

标签 android android-ndk

我正在尝试在我的 Android 应用程序中使用一个大型 C++ 库。我正在使用 eclipse 和 android ndk 插件。当我运行它时,我收到了这个错误信息;

This file requires compiler and library support for the ISO C++ 2011 standard.This
support is currently experimental, and must be enabled with the -std=c++11 or
-std=gnu++11 compiler  options.

我该怎么办?如何在 Eclipse 中启用此选项?

最佳答案

将“-std=c++11”添加到您的 Android.mk 中的 CFLAGS:

LOCAL_CFLAGS += -std=c++11

关于安卓NDK : Error: must be enabled with the -std=c++11 or -std=gnu++11 compiler options,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14014659/

相关文章:

android - "Error, could not load media"尝试调用照片应用裁剪 Intent 发送指向文件目录的 Uri

android-ndk - 来自 NIO Direct ByteBuffer 的 Android RenderScript 分配副本

java - 在 Android App 中加载多个 native 库的最佳方法

android - java.lang.UnsatisfiedLinkError 错误

javascript - 如何获取我的App id(或POC id)?

Android如何等到服务实际连接?

java - AdMob 广告未显示(使用 Logcat 输出)

java - 通过 surfaceview 使用 zxing 条形码阅读器

java - 如何从另一个 native 库 (.so) 加载 native 库 (.so)?

android - 如何使用 ffmpeg 和 sdl 为 Android 制作视频播放器?