【问题标题】:Android NDK: Error: must be enabled with the -std=c++11 or -std=gnu++11 compiler optionsAndroid NDK:错误:必须使用 -std=c++11 或 -std=gnu++11 编译器选项启用
【发布时间】:2012-12-23 20:58:42
【问题描述】:

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

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 中启用此选项?

【问题讨论】:

    标签: android android-ndk


    【解决方案1】:

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

    LOCAL_CFLAGS += -std=c++11
    

    【讨论】:

    • 我添加了,我得到了同样的错误信息。你能用完整的语法打字吗?
    猜你喜欢
    • 2019-11-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-09-12
    • 1970-01-01
    • 2018-05-12
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多