Even a simple code like this gives the error
string test= "hello";
string part = test.substr(2, 3);
Invalid arguments Candidates are: stlpmtx_std::basic_string,stlpmtx_std::allocator> substr(?, ?)
Even casting to size_t did not not help string part = test.substr((size_t)2, (size_t)3);
But both pieces of code working when running it as a console application using gcc 4.6 on Linux. But when using Androind NDK it gives me the error.
If I close the file in the editor and close Eclipse, and then open Eclipse and build the project it compiles. But if I have the file open it throws up the error.
I am using APP_STL:= stlport_static in the Application.mk make file
Yes I did include <string>
Edit: I just looked at the times of .so file, it seems to be compiling even though Eclipse is showing the errors.