0

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:

Can't include C++ headers like vector in Android NDK

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.

Community
  • 1
  • 1
cataHHH
  • 223
  • 1
  • 4
  • 14

1 Answers1

0

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
Alex Cohn
  • 56,089
  • 9
  • 113
  • 307