Eclipse CDT shows errors before project is built

和自甴很熟 提交于 2019-12-12 05:28:47

问题


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???


回答1:


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.



来源:https://stackoverflow.com/questions/13314825/eclipse-cdt-shows-errors-before-project-is-built

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!