Home:ALL Converter>Can't include STL header files with Android NDK r5

Can't include STL header files with Android NDK r5

Ask Time:2010-12-17T01:46:51         Author:Mark Ingram

Json Formatter

I've got a very simplistic application:

#include <vector>

void android_main(struct android_app* state)
{

}

When I build it, I get the following error:

test/jni/main.c:14:18: error: vector: No such file or directory

How the hell do I include STL header files? I've found stlport, and I can see the header files exist in it's directory, but how do include them?

Edit: My Application.mk file has the following line:

APP_STL := stlport_static

Author:Mark Ingram,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/4463765/cant-include-stl-header-files-with-android-ndk-r5
Yakov Galka :

\n test/jni/main.c:14:18: error: vector: No such file or directory\n\n\nYou're compiling with a C compiler, probably. Change the extension to *.cpp and check that a C++ compiler is invoked in the tool-chain.",
2010-12-16T17:52:01
yy