Search code examples
eclipseeclipse-cdtcodan

Eclipse CDT shows errors before project is built


I am having a minor problem with Eclipse CDT Juno.

When I open up Eclipse for the first time, it will show many C/C++ Problem errors which put red x's on all of my projects. Many of these errors are "no such file or directory" errors for #include'd header files. However, after I clean and rebuild my projects, all of the errors go away.

I have double checked all of my indexer settings, and the index paths are pointing to the right place. I also believe the indexer is setup correctly because after a build, all of the "no such file or directory" errors are gone, and I can navigate through the source code without any red x's.

I have also tried Index->Rebuild and Index->Freshen All Files, but the only thing that will clear the errors is a clean/build.

I feel that I shouldn't have to rebuild all of my projects every time I open Eclipse. Any thoughts???


Solution

  • I was finally able to fix this by deleting the .metadata folder and rebuilding the workspace from scratch. What a pain, but at least my projects load without errors when I launch Eclipse.