NDK(18)eclipse 使用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)eclipse 使用C++ STL的更多相关文章
- NDK(18)使用C++ STL
1,在Application.mk 中使用 APP_STL := stlport_static 等. APP_ABI := x86 armeabi APP_PLATFORM := android-15 ...
- NDK(6)eclipse下断点调试ndk代码
Using the NDK Plugin 1. First set the path to SDK and NDK: Eclipse -> Window -> Preferences -& ...
- NDK(1)配置ndk,含eclipse,Android Studio1.5.1
现在的ndk配置已经非常简单,如果看到要cygwin的请关闭. 1,Eclipse 添加ndk linux,mac ,windows 相似, a.下载 ndk并解压, b.在eclipse的andro ...
- NDK安装 eclipse 不出现NDK目录问题
android adt自带eclipse无法设置ndk路径 具体情况是 我在mac上搭建android环境 到android sdk官网下载r23版本的adt时自带的eclipse没有设置ndk路径的 ...
- 将 Android* x86 NDK 供 Eclipse* 而移植 NDK 演示示例应用程序
目标 面向 Eclipse (ADT) 的 Android 插件如今支持基于 NDK 的应用开发. 其可自己主动生成项目和构件文件以及代码存根.并可集成到整个 Android 应用开发中(构建原生库. ...
- Android+NDK+CDT+eclipse+OPenGL ES编制和native调试
周围环境: NDK版本号r8,eclipse和Android运用adt-bundle-windows-x86打包版本是更方便, 一.NDK汇集 1.源代码 NDK的examples文件夹中有Hello ...
- Install NDK in Eclipse/Android Studio
1. Download NDK https://developer.android.com/tools/sdk/ndk/index.html 2.Install NDK $ tar xvf andro ...
- NDK安装教程 not a valid ndk directory -- Eclipse
第一步:下载 Eclipse IDE for Java Developers http://www.eclipse.org/downloads/ 第二步:下载CDT http://www.eclips ...
- NDK开发-简介&环境搭建(Eclipse,Android Studio)
NDK简介 NDK(Native Development Kit)是一套工具集,允许你在Android应用中嵌入c或c++. 使用NDK的好处主要有以下4点: 安全:由于apk的java层代码很容易被 ...
随机推荐
- socket的bind函数是不是只能绑定本地IP,不能绑定外网IP么?
参考: https://bbs.csdn.net/topics/391024376 别瞎猜测. 所谓bind,就是指绑定本地接受端口. 指定ip,是为了分辨多ip主机. --------------- ...
- InnoDB: Error: io_setup() failed with EAGAIN after 5 attempts
在一台server中以各数据库的备份文件为数据文件启动多个MySQL实例供SQL Review使用. 之前执行一直没有问题(最多的时候有23个MySQL实例同一时候执行).后来新配置了一台server ...
- 【bzoj2152】【聪聪可可】【点分治】
[问题描写叙述] 聪聪和可但是兄弟俩.他们俩常常为了一些琐事打起来,比如家中仅仅剩下最后一根冰棍而两人都想吃.两个人都想玩儿电脑(但是他们家仅仅有一台电脑)--遇到这样的问题,普通情况下石头剪刀布就好 ...
- java基础入门-建立能够多client链接的ServerSocket
承接上一篇文章,今天谈论一下能够多client链接的ServerSocket. 这里面注意涉及到的技术点是: 1.ServerSocket 2.多线程 这次我们分成两个类来实现,先上代码: packa ...
- linear map (also called a linear mapping, linear transformation or, in some contexts, linear function
Linear map - Wikipedia https://en.wikipedia.org/wiki/Linear_map
- 在ubuntu18.0下安装qt4.7以及qt-creator安装过程中遇到的坑
最近的嵌入式Linux系统上要做课程设计= =要用贼老贼老的qt4.7,配环境踩坑都费了我1天时间.....所以记录下来,希望能给和我遇到相同问题的朋友一点帮助 apt-get install g++ ...
- Enterprise Architect 生成项目类图
Enterprise Architect使用教程: https://blog.csdn.net/chenglc1612/article/details/81083151 主要流程 --到此-自动生成完 ...
- 疯狂JAVA——数组
java是静态语言,java数组也是静态语言 静态初始化: String[] a = new String[]{ "我"}; String[] b = { "你" ...
- mac系统下设置eclipse的补全快捷键方法
eclispe Word Completion 的默认快捷键是Alt+/eclipse Content Assist 的默认快捷键是Ctrl+Space在使用中发现Word Completion经常导 ...
- codeforces round 417 div2 补题 CF 812 A-E
A Sagheer and Crossroads 水题略过(然而被Hack了 以后要更加谨慎) #include<bits/stdc++.h> using namespace std; i ...