-1

I have installed Eclipse in Ubuntu. I'm trying to run hello world program :

#include <iostream>
using namespace std;

int main() {
    cout << "!!!Hello World!!!!" << endl; // prints !!!Hello World!!!
    return 0;
}

Programm runs fine, but in IDE I have errors:

Unresolved inclusion: <iostream>
Symbol 'std' could not be resolved
Symbol 'cout' could not be resolved
Symbol 'endl' could not be resolved

I suppose something wrong with inclusion, but what?

vico
  • 17,051
  • 45
  • 159
  • 315

1 Answers1

1

Have you installed gcc?

sudo apt-get install gcc-<version>

By the way, here should be the answer to your problem.

edit

If you have already installed gcc, maybe you have to specify the filesystem path where iostream.h is located. You have to add include path in eclipse settings, take a look here.

  • Alt+Enter to open projects proprerties.
  • Expand C/C++ General and select Paths and Symbols.
  • Click Add to define new element (Include Path, Symbol, Library path etc).
  • Click Edit to change selected element (Include Path, Symbol, Library path etc).
  • Click Delete to remove selected element (Include Path, Symbol, Library path etc).
  • Click Export to make selected element (Include Path, Symbol, Library path etc) exported.
  • Click Unexport to remove selected element (Include Path, Symbol, Library path etc) from export list.
  • Click Move up and Move down to set elements (Include Paths, Library paths etc) order.

Include

Community
  • 1
  • 1
Luca Davanzo
  • 21,000
  • 15
  • 120
  • 146