Eclipse CDT在构建项目之前显示错误 [英] Eclipse CDT shows errors before project is built

查看:85
本文介绍了Eclipse CDT在构建项目之前显示错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Eclipse CDT Juno上有一个小问题。

I am having a minor problem with Eclipse CDT Juno.

当我第一次打开Eclipse时,它将显示许多C / C ++问题错误,所有我的项目中都带有红色x。其中许多错误是#include头文件的无此类文件或目录错误。但是,在清理并重建项目后,所有错误都会消失。

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.

我仔细检查了所有索引器设置,索引路径指向正确的地方。我也相信索引器的设置正确,因为在构建之后,所有没有这样的文件或目录错误都消失了,而且我可以在源代码中导航而没有任何红色的x。

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.

我也尝试过使用Index->​​ Rebuild和Index->​​ Freshen所有文件,但是清除错误的唯一方法是清除/构建。

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

我觉得我每次打开Eclipse都不必重新构建所有项目。任何想法???

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

推荐答案

我终于能够通过删除.metadata文件夹并从头开始重建工作空间来解决此问题。太痛苦了,但是至少在启动Eclipse时我的项目加载没有错误。

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.

这篇关于Eclipse CDT在构建项目之前显示错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆