I ran into the same problem. It seems that STL is not automatically included in NDK projects by default. It also means iostream , fstream , string , etc. Cannot be used immediately. To enable them, you need to modify your Application.mk file. If you donβt have it (it is in the <project>/jni ), just create a new one, empty. Add a line:
APP_STL := stlport_static
Also, be sure to include using namespace std; or equivalent along with the usual #include <iostream> , etc.
Warpspace
source share