Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

Unresolved inclusion warning in Eclipse

📅 2015-Oct-01 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ cpp, eclipse, eclipse cdt, warning ⬩ 📚 Archive



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

© 2022 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘📧