C++11 support in NativeLibrary for Android

Home / Uncategorized / C++11 support in NativeLibrary for Android

I’m trying to create a native library in C++, which I can use in Android. I’ve created a project in Visual Studio 2017: Dynamic Shared Library (Android), and added my cpp code.

Though some of the code is running C++11, and I’d really like to keep it that way. When I compile, I get the error: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.

So I first tried going to Project->Properties->C/C++->Language->C++ Language Standard, and set the options as following:

When I compile now, I get exactly the same error. So I tried manually adding the -std=c++11 flag under additional options, though still getting the error.

Why is the compiler not willing to compile using the ++11 standard, and what can I do to fix this? I know it’s experimental, but it should at least try to compile.

Best regards

The problem was solved, when I changed the settings to be for All Platforms, and not just ARM.
Read more

Leave a Reply

Your email address will not be published. Required fields are marked *