In Ubuntu 12.04 LTS I installed the Eclipse CDT plugin and opened the new hello world project to just test everything out. When I was creating the project, I chose the only toolchain: "Linux GCC"

When the project is created, however, it says that


are unresolved. Thus, lines with cout and endl can't be used and it cannot find std.

using namespace std; is also causing problems.

How can I get my #include directives for standard library headers recognized, to support code using the std namespace?

  • Do these errors persist even after you do Project > Build All? Jun 14, 2012 at 16:00
  • 2
    Mayne this is a stupid question but did you create a new project specifically as a C++ project rather than a C project?
    – bazz
    Jul 26, 2012 at 21:42

1 Answer 1


If you had the same issue I did, I suspect that your project builds but code-completion / code highlighting fails? I've just found some notes that may be useful. Here's what I did:

  • Project->Properties

  • C/C++ General

  • Paths and Symbols

  • select the appropriate language

  • Click "Add" and add the compiler-version specific directories

For language 'GNU C++' I added:


For "GNU C" I added:


TBH, I don't think all the directories above are actually required (you could probably remove the 'bits' directories) but the list above worked for me at the time.

I am now using Eclipse Indigo (version 3.7.2) from eclipse.org and it automatically finds and adds the correct include directories. The list is different for me:


Clearly, only add the include directories that actually exist on your system ;-)

  • Well, this doesn't work for me - although I'm actually on Debian Stretch 64-bit. But I did adapt your suggestions to my platform.
    – einpoklum
    Dec 11, 2015 at 18:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.