1
votes

compiler says: Symbol 'std' could not be resolved Symbol 'cout' could not be resolved Symbol 'endl' could not be resolved

It seems that it is a C compiler, but I really installed everything listed in CDT.

I tried searching but it's all about windows. I've installed all the plugins in CDT.

Something strange is that the file was once compiled and printed "Hello world". I can't understand what is happening.

My os is osx lion (10.7.3). Hope someone can help me! Thanks!

My eclipse version is 3.7. My cdt version is 8.0.0.

Here's the code for helloworld.cpp

#include <iostream>

using namespace std;


int main() {


    cout << "!!!Hello World!!!" << endl; // prints !!!Hello World!!!

    return 0;

}
2

2 Answers

0
votes

Eclipse can be quite difficult to navigate. Can you cut 'n' paste your helloworld.cpp and the links to the Eclipse instructions you followed?

Edit: K, It appears that it's not recognizing the file as c++. You may want to make sure you started with a c++ project. Also, many of the windows eclipse problems should help you as well.

0
votes

I fixed this by replace Indigo with an older version Helios, and it's working fine. Hope someone can come up with other approaches to the problem without changing Eclipse version.