Question

I'm using Eclipse ADT with the Android NDK and I'm getting a lot of unresolved in strings, vectors and other C++ variables.

It's a fresh install (ADT), and I have VS2012 installed already. I've followed the steps here and understood what has to be done, but I think this "find" command isn't for Windows, but for Linux.

How can I find these missing headers in Windows to include in Eclipse's C++ Symbols and Path?

EDIT: I'm getting unresolved errors in strings, vectors and other variables in the C code. The project builds fine as show in the Console tab, but I can't run it because it says my project contains errors. Screenshot:

enter image description here

EDIT 2: I've added the \android-ndk-r9c\sources\cxx-stl\gnu-libstdc++ folder instead of the \android-ndk-r9c\sources\cxx-stl\gnu-libstdc++\4.8\include in Project->Properties->C/C++ General->Paths and Symbols and at least strings are now resolved, leaving only vectors as unresolved... is this the "right" way to solve this?

I'm slowly adding the source files and compiling to check for errors and there's still plenty of other headers I'm using besides <string> and <vector>...

FIXED: From here, last answer. I added #include <stl/_vector.h>, the Problem went away. Then I removed this line and put the old #include <vector> one and now it's not marking as error anymore... sigh. Marking this as duplicate...

No correct solution

OTHER TIPS

Can't help noticing that you use string and vector without qualifying the namespace (which is std). I couldn't see the using namespace std; statement, either.

So either replace string with std::string, or insert a using... above the class definition.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top