编译android时支持C++11

来源:互联网 发布:逆波兰表示法 c语言 编辑:程序博客网 时间:2024/05/16 13:51

引用

[plain] view plaincopyprint?
  1. Android下使用c++11的测试 - zhangchen_qinyinghua的专栏 - 博客频道 - CSDN.NET  
  2. http://blog.csdn.net/zhangchen_qinyinghua/article/details/10033777  

正文

  1. 增加Application.mk文件,内容如下
    [cpp] view plaincopyprint?
    1. NDK_TOOLCHAIN_VERSION:=4.8    // NDK r8e的版本才开始支持C++11 在 r8e 中使用GCC 4.7 的C++11功能
    2. APP_STL:=gnustl_static    
  2. 增加Android.mk
    [cpp] view plaincopyprint?
    1. LOCAL_CPPFLAGS:=-std=c++11 -pthread    

  1. 增加支持c++11和多线程。可以自行增加其他参数。LOCAL_CPPFLAGS:= -std = C + + 11 -pthread -frtti -fexceptions

转载地址:http://blog.csdn.net/kingsollyu/article/details/10101799

也可参考此文章:http://blog.csdn.net/liaowenfeng/article/details/12747465

0 0
原创粉丝点击