Search code examples
c++eclipseincludestdinclude-path

std::string could not be resolved in eclipse ubuntu


I've tried searching the problem and even saw a similar question in:

"string could not resolved" error in Eclipse for C++ (Eclipse can't resolve standard library)

but his solution of installing mingw did not work. (what is msys? aptitude didn't find any package with that name)

so I get an error message of the std::string problem even though there is an #include which Eclipse does recognize. I've put /usr/include/c++/4.6.3 in the includes of GNU c++ but the problem was not solved... what else can I do?

the code is simple:

#include<string> 
. 
. 
std::string var;

and the error i get is: "type std::string could not be resolved"

the code is made up from a lot of classes so i can't paste it all. I've added everything to eclipse from an existing project. I've got the same problem with uint_32t and uint_64t which are not resolved

ANSWER: I solved the issue. Since i created a new project from an existing project, then it just didn't add anything to the include directories so i created a new empty project and just included everything which was included there and it solved it


Solution

  • I solved the issue and it was not that trivial as I thought.

    Since i created a new project from an existing project, then it just didn't add anything to the include directories. Linux/Eclipse is so messed up that it can't even add folders recursively?

    I just created a new empty project and copied what I needed and was done with it.