Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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?

share|improve this question
Do these errors persist even after you do Project > Build All? –  Eliah Kagan Jun 14 '12 at 16:00
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 '12 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 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 ;-)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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