Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

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

like image 612
SavasCinar Avatar asked Dec 23 '12 20:12

SavasCinar


1 Answers

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

LOCAL_CFLAGS += -std=c++11
like image 168
Gunther Piez Avatar answered Sep 29 '22 08:09

Gunther Piez