“问题”窗口显示假错误
Eclipse CDT 在我的编辑器/问题窗口中显示奇怪的错误。例如,对于像这样的行:
#include <string>
它表示: Unresolved Included:
,就好像 Eclipse 无法找到这样一个基本的包含文件一样。当然,由于这些包含错误,后来几乎无法识别任何定义,从而导致更多错误。尽管该项目是从 Eclipse 正确构建的,但仍然如此。
这是一个基于 autotools
的源。该项目设置为自定义 Makefile 模式。我使用 Debian、Eclipse 3.7。
如何摆脱这些假错误?
Eclipse CDT is showing strange errors in my editor/problems windows. For example, for a line like:
#include <string>
it says: Unresolved inclusion: <string>
, as if Eclipse couldn't find such a basic include file. Of course because of those include errors, almost no definition is recognized later, resulting in even more errors. This is despite that the project builds correctly from Eclipse.
This is an autotools
-based source. The project was set to custom Makefile mode. I use Debian, Eclipse 3.7.
How to get rid of those fake errors?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我过去偶尔见过 eclipse 出现这样的问题。对我来说,这是一个带有一些头文件的项目,但没有实际的可编译项。在构建引用它的项目时,它可以正确检测到错误,但一旦错误被修复,就无法消除错误。
您可以首先在问题窗口中手动删除特定的错误/警告,然后查看它们是否消失。
I have seen eclipse have issues like this occasionally in the past. For me, it was a project with a few header files, but no actual compile-able items. It would correctly detect errors when building projects that referenced it, but would fail to get rid of the errors once they were fixed.
You can start by deleting the particular errors/warnings manually in the problem window and see if they stay away.