Android的NDK,包括STL [英] Android NDK including stl

查看:146
本文介绍了Android的NDK,包括STL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想包括我的项目之一STL,但它不工作...我已经注意到这个线程

Hi I am trying to include STL in one of my projects but it does not work ... I have noticed this thread

很多次,看到的:

<一个href=\"http://stackoverflow.com/questions/4893403/cant-include-c-headers-like-vector-in-android-ndk\">Can't包括C ++就像在Android的NDK矢量头

不过,这并不为我工作
这是我的make文件:

But it does not work for me this is my make file:

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)

APP_STL := stlport_static
LOCAL_MODULE    := hellostl
LOCAL_SRC_FILES := hellostl.cpp
include $(BUILD_SHARED_LIBRARY)

我也加入了这个对我有diroctories
C:\\ Android的NDK \\来源\\ CXX-STL \\的STLport \\ stlport的

I have also added this to my include diroctories C:\android-ndk\sources\cxx-stl\stlport\stlport

但它仍然无法正常工作,我永诺得到没有这样的文件或目录

But it still does not work, I allways get no such file or directory for

#include <vector>

每当我尝试建立

非常感谢你。

推荐答案

APP_STL:= stlport_static

应Application.mk被设置,而不是在Android.mk

should be set in Application.mk, not in Android.mk

或者你也可以将它放在命令行,例如

Or you can set it on command line, e.g.

ndk-build APP_STL=stlport_static

这篇关于Android的NDK,包括STL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆