Android NDK: Error: Must be enabled with the options -std = C ++ 11 or -std = gnu ++ 11

I am trying to use one large C ++ library in my Android app. I am using eclipse with android ndk plugin. When I ran it, I received 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. 

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

+11
android android-ndk
Dec 23
source share
1 answer

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

 LOCAL_CFLAGS += -std=c++11 
+13
Dec 23
source share



All Articles