Unresolved inclusion warning in Eclipse



When working with C++ code in Eclipse, you might see a Unresolved inclusion warning for some include header lines. This is indicated with a question-mark and an underline squiggle. On hovering the mouse over it, a tooltip is shown with the Unresolved inclusion message.


This is caused when the Eclipse indexer cannot find the header file you have included. This commonly happens when you have installed the library of that header file in a non-standard location.

  1. Open the project Properties and go to C/C++ General -> Paths and Symbols.
  2. In the Includes tab, go to the GNU C++, choose Add and add the path to the directory that contains the above header file.
  3. After re-indexing the code of your project, this warning should be gone.

Tried with: Eclipse 4.5 and Ubuntu 14.04

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s