Reputation: 5407
I am trying to compile a large c++ code for ndk.
I get a bunch of errors. A lot of them related to vectors:
vector<int> myvector
--> the '<
' gives an error::iterator
cannot be declaredAny ideas on how to get full STL support? I use a lot of libraries, like vector, algorithm, iostream etc
Here is my Android.mk file
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := native
LOCAL_SRC_FILES := vns.cpp note.cpp cscore.cpp hscorecf.cpp hscorecp.cpp scoreinfo.cpp cscore.cpp score.cpp randMusic.cpp input.cpp main.cpp
APP_STL := stlport_shared
#but I have tried system, stlport_static, stlport_shared, or gnustl_static.
LOCAL_LDLIBS := -llog
include $(BUILD_SHARED_LIBRARY)
Got it.
I needed to put APP_STL := stlport_shared in a separate Application.mk file!
Upvotes: 2
Views: 2306
Reputation: 5407
Got it. I needed to put APP_STL := stlport_shared in a separate Application.mk file.
Upvotes: 1
Reputation: 2944
Seems like you forgot to #include <vector>
header or using namespace std;
Upvotes: 0