0

I try to use the STL But it says string: no such file or directory

Application.mk

APP_STL := stlport_static
LOCAL_CPPFLAGS := -std=c++11 

Android.mk

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
APP_ABI:=all
LOCAL_MODULE    := hello-jni
LOCAL_SRC_FILES := hello-jni.c
include    $(BUILD_SHARED_LIBRARY)
Alex Cohn
  • 56,089
  • 9
  • 113
  • 307
BucketLava
  • 15
  • 6

1 Answers1

0

You can rename your source file hello-jni.c to hello-jni.cpp, if you don't want to mess up with gcc behavior.

Application.mk

APP_STL := stlport_static
APP_CPPFLAGS := -std=c++11
APP_ABI := all
Alex Cohn
  • 56,089
  • 9
  • 113
  • 307