Android的NDK:错误:必须用-std启用= C ++ 11或-std = GNU ++ 11的编译器选项 [英] Android NDK: Error: must be enabled with the -std=c++11 or -std=gnu++11 compiler options

查看:1855
本文介绍了Android的NDK:错误:必须用-std启用= C ++ 11或-std = GNU ++ 11的编译器选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的Andr​​oid应用程序中使用一个大的C ++库。我使用的Eclipse与Android NDK的插件。当我运行它,我得到这个错误信息;

I am trying to use one big c++ library in my android application. I am using eclipse with android ndk plugin. When I run it, I got this error message;

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这个选项?

What should I do? How can I enable this option in eclipse?

推荐答案

添加-std = C + + 11到你的 CFLAGS Android.mk

Add "-std=c++11" to your CFLAGS in your Android.mk:

LOCAL_CFLAGS += -std=c++11

这篇关于Android的NDK:错误:必须用-std启用= C ++ 11或-std = GNU ++ 11的编译器选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆