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 使用 * 说明: ...
随机推荐
- Thinkphp模板中使用自定义函数的方法
注意:自定义函数要放在项目应用目录/common/common.php中. 这里是关键. 模板变量的函数调用格式:{$varname|function1|function2=arg1,arg2,### ...
- UML 小结(5)- 图解 Rational Rose 的详细安装过程
在学习UML的时候,会用到画图工具:Rotional Rose . 原以为这款软件直接下载下来或者跟朋友那边拷过来就可以直接用了,结果却是没有那么简单,如果读者您也是为了解决这个家伙的安装问题的话,那 ...
- Palindrome Partitioning
Palindrome Partitioning Given a string s, partition s such that every substring of the partition is ...
- 20145120 《Java程序设计》第4周学习总结
20145120 <Java程序设计>第4周学习总结 教材学习内容总结 -定义子类,加"extends+父类名"以继承父类. -子类只能继承一个父类 -编辑器会检查等号 ...
- Notes of the scrum meeting(2013/10/23)
ps:本来是10月23号周三下午开的会,这几天由于各种事情忙,忘记写博客了,现在补上. 软工项目组buaa_smile开始项目第一次scrum meeting meeting time:4:00~5: ...
- iOS10 配置须知-b
在iOS10中,如果你的App想要访问用户的相机.相册.麦克风.通讯录等等权限,都需要进行相关的配置,不然会直接crash.需要在info.plist中添加App需要的一些设备权限. NSBlueto ...
- 历时一周,unity3d+xtion打造我的第一个休闲体感小游戏《空降奇兵》
1.游戏介绍 本游戏属于休闲小游戏,主要操作如下: 菜单控制:举起左手或右手,点击左边或者右边的菜单:挥动左手或右手,选择关卡: 操作方式:玩家跳跃,游戏中的伞兵从飞机开始降落:玩家通过控制伞兵的左右 ...
- 查看系统网络连接打开端口、系统进程、DOS打开文件
问题描述: DOS查看系统网络连接打开端口.打开的服务 问题解决: (1)DOS查看系统网络连接打开端口 注: 使用 netstat 命令,可以查看系统打开的端口 (2)查看和关闭系统打开进程 ...
- [bzoj 2159]Crash的文明世界
今天看到一个鬼题 心情好的时候写 [题意]求树上所有点对距离的k次方和,所有边权为1 大爷方的题解:http://tonyfang.is-programmer.com/posts/204972.htm ...
- 2013 Asia Chengdu Regional Contest
hdu 4786 Fibonacci Tree http://acm.hdu.edu.cn/showproblem.php?pid=4786 copyright@ts 算法源于ts,用最小生成树可以求 ...