5

This might very well be similar if not the same to question that has already been asked. I am running eclipse CDT on ubuntu machine. I get false compilation error saying 'vector' symbol could not be resolved. I have tried to fix it by manually looking for vector file location with the following command:find /usr/include/ -name vector -print This lists the location of vector in my machine as /usr/include/c++/4.5/vector I manually add it to the GNU C++ include directory by going to project properties -> C/C++ General -> Paths and Symbols ->GNUC++->Add and add the location but to no avail. I also tried adding other paths as suggested in one of the comments in this post by Catskul. I am pretty sure its the linker issue, the tool chain I use is the default Linux gcc, have also tried the cross gcc tool chain. And yes I #include <vector> and include using namespace std as well. Also intellisense popup did not have vector when I typed std::. F3 on #include<vector> took me to the source. Any help in this issue is appreciated.

Edit 2: Well I had to do a fresh install of eclipse to make it work. I had tested the same application in another system, worked like a charm, so I went for an easy fix.

Community
  • 1
  • 1
Ha Sh
  • 724
  • 5
  • 26
  • possible duplicate of [Eclipse CDT: Symbol 'cout' could not be resolved](http://stackoverflow.com/questions/10803685/eclipse-cdt-symbol-cout-could-not-be-resolved) – panmari Jul 28 '13 at 08:22

1 Answers1

3

I meet a similar error, and I find the answer from website error , Symbol 'vector' could not be resolved . You can do this: In Eclipse, right-click on the project name...Select Index...Rebuild.And the you clean and build the project.

Community
  • 1
  • 1
  • 1
    Index rebuild does not help in my case. Thanks for the link though appreciate the help. – Ha Sh Apr 19 '12 at 03:25