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 使用 * 说明: ...
随机推荐
- SlimDx绘制点图元的问题
问题:点图元在自己创建的三维环境里渲染不出来,代码如下: GMCustomVertex.PositionNormalColored wellPart = new GMCustomVertex.Posi ...
- Oppotunity land---China
China is a land of opportunity.Following the development of China,every sector has made their contri ...
- BAT CMD 批处理文件脚本 -1
http://www.cnblogs.com/linglizeng/archive/2010/01/29/Bat-CMD-ChineseVerion.html 1. 综述 ...
- 【BZOJ】【2440】【中山市选2011】完全平方数
莫比乌斯函数/容斥原理 PoPoQQQ讲义引入例题= = 比较水……就是莫比乌斯函数的简单应用,也可理解为乱容斥一下…… 二分答案——>求1~x有多少个无平方因子的数Q(x). 引用一下PoPo ...
- 前端MVC学习——模块发开发、seajs学习
这份学习链接已经足够了:http://seajs.org/docs/#intro 我假设你至少已经浏览过上述链接文档.并且掌握了基本的seajs基础知识~ 手把手教你创建helloworld~ Hel ...
- uva 534
floyd算法 数据量比较小 就简单了~ /************************************************************************* > ...
- jsp的常用指令有哪些(编译指令/动作指令整理)
jsp的常用指令有哪些(编译指令/动作指令整理) JSP动作指令 JSP - JSP中的脚本.指令.动作和注释
- dom4j处理xml文件,读取xml字符串,格式化xml文件
1.xml文件 <?xml version="1.0" encoding="UTF-8"?> <employees> <emplo ...
- 终于明白公测的beta 源自何处了
A very early version of a software product that may not contain all of the features that are planned ...
- ZOJ 3261 Connections in Galaxy War(逆向并查集)
参考链接: http://www.cppblog.com/yuan1028/archive/2011/02/13/139990.html http://blog.csdn.net/roney_win/ ...