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

many times and seen:

<a href="https://stackoverflow.com/questions/4893403/cant-include-c-headers-like-vector-in-android-ndk" rel="nofollow">Can't include C++ headers like vector in Android NDK</a>

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)

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>

whenever I try to build

Thank you very much.


APP_STL := stlport_static

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


  • Building native Opencv for Android with Eclipse gives “undefined reference to `cvCreateFileCapture&#
  • TypeError: expected str, bytes or os.PathLike object, not _io.BufferedReader
  • Multiselect ListBox
  • Django Celery - Missing something but I have no idea what? Have results but can't get them
  • Persist selected rows the correct way
  • drag & drop not working when page loaded in a parent div
  • Window authentication in sql server and asp.net
  • Using Promises in Mongoose Routes
  • Persist selected rows the correct way
  • How to include constraint layout library in an AOSP project
  • Undefined reference error, can not create shared library
  • How much time do I need to learn LabVIEW
  • OpenCV opencv2/core/core.hpp: No such file or directory
  • Google Chrome API: How do I add my app to show an icon on the “New Tab” (Apps) page?
  • Include JavaScript in Perl-CGI generated page
  • Error in linking C++ static library with android ndk(Error: file format not recognized)
  • Moving native libraries from android app to system lib and accessing it from app
  • How to resolve promises one after another?
  • Will the was6 plugin for maven work with WAS 7
  • Is std::function supported in the NDK?
  • Dollars in Makefile environment variables
  • Compiling Assembly for android
  • JavaScript Date Bug February 2014
  • How to remove words from wordcloud R package so that they can be included in the output?
  • Ruby: Is it true that #map generally doesn't make sense with bang methods?
  • How to use Spring Integration 5 with Spring Boot 1.5.x
  • integrate POCO library in android ndk
  • Changing Jupyter Notebook start up folder by modifying “start in” not working any more
  • List images(01.png) and descriptions(01.txt) from directory
  • Copy to all folders batch file?
  • How to test if a URL from an Eclipse bundle is a directory?
  • Run Powershell script from inside other Powershell script with dynamic redirection to file
  • Load html files in TinyMce
  • How can I get HTML syntax highlighting in my editor for CakePHP?
  • coudnt use logback because of log4j
  • Change div Background jquery
  • How does Linux kernel interrupt the application?
  • Busy indicator not showing up in wpf window [duplicate]
  • Why do underscore prefixed variables exist?