简体   繁体   English

包含stl的Android NDK

[英]Android NDK including stl

Hi I am trying to include STL in one of my projects but it does not work ... I have noticed this thread 嗨,我正在尝试将STL包含在我的一个项目中,但是它不起作用...我注意到此线程

many times and seen: 很多次看到:

Can't include C++ headers like vector in Android NDK 不能在Android NDK中包含vector之类的C ++标头

But it does not work for me this is my make file: 但这对我不起作用,这是我的make文件:

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

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

I have also added this to my include diroctories C:\\android-ndk\\sources\\cxx-stl\\stlport\\stlport 我还将此添加到我的包含目录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>

whenever I try to build 每当我尝试建立

Thank you very much. 非常感谢你。

APP_STL := stlport_static

should be set in Application.mk, not in Android.mk 应该在Application.mk中设置,而不是在Android.mk中设置

Or you can set it on command line, eg 或者您可以在命令行上进行设置,例如

ndk-build APP_STL=stlport_static

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM