NDK(18)使用C++ STL
1.引用库
在Application.mk 中使用 APP_STL := stlport_static 等.
APP_ABI := x86 armeabi
APP_PLATFORM := android-15 #APP_STL := gnustl_static #GNU STL
APP_STL := stlport_static
APP_CPPFLAGS := -fexceptions -frtti #允许异常功能,及运行时类型识别
APP_CPPFLAGS +=-std=c++11 #允许使用c++11的函数等功能
APP_CPPFLAGS += -frtti #开启RTTI
#APP_CPPFLAGS +=-fpermissive #此项有效时表示宽松的编译形式,比如没有用到的代码中有错误也可以通过编译;
#使用GNU STL时不用此项std::string 居然编译不通过!!
APP_STL 的取值有 : 推荐使用 stlport_static
system -> Use the default minimal system C++ runtime library.
gabi++_static -> Use the GAbi++ runtime as a static library.
gabi++_shared -> Use the GAbi++ runtime as a shared library.
stlport_static -> Use the STLport runtime as a static library.
stlport_shared -> Use the STLport runtime as a shared library.
gnustl_static -> Use the GNU STL as a static library.
gnustl_shared -> Use the GNU STL as a shared library.
c++_static -> Use the LLVM libc++ as a static library.
c++_shared -> Use the LLVM libc++ as a shared library.
2.加入头文件
右键项目,Properties ... 加入stl头文件 的include
/home/admin/Android/android-ndk-r10e/sources/cxx-stl/stlport/stlport/

3.使用
使用,注意,这里用的是静态方式,如用动态的,那么要在java中
static{
System.loadLibrary("stl的库");
}
NDK(18)使用C++ STL的更多相关文章
- NDK(18)eclipse 使用C++ STL
1.引用库 在Application.mk 中使用 APP_STL := stlport_static 等. APP_ABI := x86 armeabi APP_PLATFORM := androi ...
- NDK 使用STL
参考链接:Android中使用STL 1. 在 Application.mk 中添加代码"APP_STL:= gnustl_static"后, 文件中的内容如下: APP_ABI ...
- ANDROID STUDIO, GRADLE AND NDK INTEGRATION
Originally posted on:http://ph0b.com/android-studio-gradle-and-ndk-integration/ With the recent chan ...
- NDK开发-零散知识点整理
JavaVM 标准Java平台下,每一个Process可以产生很多JavaVM对象,但在Android平台上,每一个Process只能产生一个Dalvik VM对象,也就是说在Android进程中是通 ...
- Android STL PORT
ndk中包含了stl对应的库,在$(NKD_HOME)/sources/cxx-stl/stlport/stlport 有关Android NDK的C++ STL开发相关总结如下: 从Android ...
- Android NDK 编译选项设置[zhuan]
http://crash.163.com/#news/!newsId=24 在Android NDK开发中,有两个重要的文件:Android.mk和Application.mk,各尽其责,指导编译器如 ...
- Android NDK编译选项设置
Android NDK编译选项设置 网易加固关注 0.5472016.08.22 14:07:00字数 3,034阅读 6,805 在Android NDK开发中,有两个重要的文件:Android.m ...
- MyEclipse 配置Android环境
eclipse https://www.eclipse.org/downloads/download.php?file=/oomph/epp/mars/R2/eclipse-inst-win64.ex ...
- I.MX6 Android stlport 使用
/****************************************************************** * I.MX6 Android stlport 使用 * 说明: ...
随机推荐
- 使用PHP计算上一个月的今天
一日,遇到一个问题,求上一个月的今天. 最开始我们使用 strtotime(“-1 month”) 函数求值,发现有一个问题,月长度不一样的月份的计算结果有误. 比如:2011-03-31,得到的结果 ...
- (ACM)C++ STL 训练(第一天)
因为老师说ACM考的是纯C++,所以打算抛弃VS的VC++不用了,针对纯C++的编译器有Intel Compiler(不过要钱),MinGw(个人用的),当然还有微软的VC++ 编译器,IDE你们可以 ...
- PHP中日期时间函数date()用法总结
date()是我们常用的一个日期时间函数,下面我来总结一下关于date()函数的各种形式的用法,有需要学习的朋友可参考. 格式化日期date() 函数的第一个参数规定了如何格式化日期/时间.它使用字母 ...
- startDiscovery() and startLeScan().
You have to start a scan for Classic Bluetooth devices with startDiscovery() and a scan for Bluetoot ...
- 写一个EF的CodeFirst的Demo
写一个EF的CodeFirst的Demo 今天打算写一个关于EF的CodeFirs的一个小Demo.先略说一个EF的三种与数据库,怎么说,叫映射么,好吧,那就这么叫吧,就是一个是ModelFirst就 ...
- ExtJs3带条件的分页查询的实现
使用ExtJs的同志们一定知道GridPanel哈~神器一般,非常方便的显示表格类型的数据,例如神马用户列表.产品列表.销售单列表.XXXX列表等.从数据库中查询所需的数据,以列表的形式显示出来,我们 ...
- MacOS Cocos2d-x-3.2 创建HelloWorld项目
开发环境: Mac OSX 10.9.3 Cocos2d-x-3.2 首先,打开终端cd到目录/cocos2d-x-3.2/tools/cocos2d-console/bin下,运行cocos.py脚 ...
- Codeforces Round #256 (Div. 2) Multiplication Table
C题, #include<cstdio> #include<cstring> #include<algorithm> #define maxn 5005 using ...
- Ubuntu下非常给力的下载工具--uget+aria2
转自Ubuntu下非常给力的下载工具--uget+aria2 Windows下的下载工具--迅雷,之所以下载速度快,乃是它能搜索资源.为己所用,而不是仅仅从原始地址这单一资源处下载. Ubuntu下也 ...
- PHP字符串函数之 strstr stristr strchr strrchr
strstr -- 查找字符串的首次出现,返回字符串从第一次出现的位置开始到该字符串的结尾或开始. stristr -- strstr 函数的忽略大小写版本 strchr -- strstr 函数的别 ...