【Android】Error:(32, 2) error: #error ....support for the ISO C++...
2016-09-28 11:07
399 查看
Error:(32, 2) error: #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.
解决方法:
nullptr是C++11引入的新特性,解决C和C++中NULL的定义不一致所带来的编译器兼容问题。C中NULL是指向0地址的指针(void *)0,c++中则是定义为整数0.
ndk中解决这个问题的办法就是添加对C++11的支持,在Application.mk中添加:
NDK_TOOLCHAIN_VERSION = 4.9
APP_CPPFLAGS := -frtti -std=c++11
<pre name="code" class="html">注意:NDK_TOOLCHAIN_VERSION 》= 4.7
重新ndk-build即可
解决方法:
nullptr是C++11引入的新特性,解决C和C++中NULL的定义不一致所带来的编译器兼容问题。C中NULL是指向0地址的指针(void *)0,c++中则是定义为整数0.
ndk中解决这个问题的办法就是添加对C++11的支持,在Application.mk中添加:
NDK_TOOLCHAIN_VERSION = 4.9 APP_STL := gnustl_static APP_CPPFLAGS := -frtti -fexceptions -std=c++11 APP_ABI := armeabi armeabi-v7a APP_PLATFORM := android-8
NDK_TOOLCHAIN_VERSION = 4.9
APP_CPPFLAGS := -frtti -std=c++11
<pre name="code" class="html">注意:NDK_TOOLCHAIN_VERSION 》= 4.7
重新ndk-build即可
相关文章推荐
- #error This file requires compiler and library support for the ISO C++ 2011错误解决办法
- error: #error This file requires compiler and library support for the ISO C++ 2011 standard.
- error This file requires compiler and library support for the ISO C++ 2011 standard.
- #error This file requires compiler and library support for the upcoming ISO C++ standard, C++0x. Th
- error This file requires compiler and library support for the ISO C++ 2011 standard
- 【转】Android 提示 “Unparsed aapt error(s)! Check the console for output”. 这个错误
- android Error occurred during initialization of VM Could not reserve enough space for object heap Could not create the Java virtual machine.
- Android An unexpected exception occurred while creating a change object. see the error log for more details
- Android Error retrieving parent for item: No resource found that matches the given name '...'
- Android 应用出错 error: Error retrieving parent for item: No resource found that matches the的第二种情况
- Android错误之--Error retrieving parent for item: No resource found that matches the given name 'Theme.A
- error: Error retrieving parent for item: No resource found that matches the given name 'android:Win
- android 项目中 Unparsed aapt error(s)! Check the console for output错误解决方法(转)
- C++中使用array报错 requires compiler and library surpport for the ISO c++ 2011 standard
- Error retrieving parent for item: No resource found that matches the given name 'android:TextAppeara
- Android Studio 报错 Error:Execution failed for task ':app:dexDebug'。support-v7 Theme.AppCompat.Light
- You receive a C4226 or a C4236 error message when you compile code to contain the keyword in 32-bit Visual C++(ZZ)
- unable to get system library for the project" error when import android project to eclips
- error: Error retrieving parent for item: No resource found that matches the given name 'android:Wind
- error: Error retrieving parent for item: No resource found that matches the given name 'android:Them