Eclipse中未解决的包含 [英] Unresolved inclusion in Eclipse

查看:92
本文介绍了Eclipse中未解决的包含的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有Eclipse版本3.8.1,可用来编写Java代码。
我最近开始用c\c ++编写,尝试安装CDT(C\C ++开发工具)插件时遇到了一些麻烦。

我知道有人问过这个问题很多,而且我在这里以前的帖子中都找到了答案,但是建议的答案都没有意义,或者没有帮助。

I have Eclipse version 3.8.1, with which I write Java code. I recently started writing in c\c++, and I'm having some troubles when trying to install the CDT (C\C++ development tooling) plugin.
I know this question was asked a lot, and I've searched for answers in previous posts here, but none of the suggested answers were relevant, or they did not help.

让我先给你到目前为止我所做的简短介绍:

Let me first give you a brief of what I have done so far:

帮助-> 安装新软件-> 可用的软件站点,然后在首选项窗口中添加以下位置: http://download.eclipse.org/tools/cdt/releases/kepler/ ,然后安装了插件。

实际上,在重新打开Eclipse之后,我现在在以下位置有了新的可用选项: 文件->新建...菜单,例如 C ++项目/ C项目等。

Help->install new software->"Available software sites", and then in the preferences window I added the location: http://download.eclipse.org/tools/cdt/releases/kepler/ and then installed the plugin.
Indeed, after reopening eclipse, I now have new available options at the "File->new..." menu, like "C++ project/C project" and so on.

当我选择创建一个新项目时,将显示以下窗口:

When I choose to create a new project, I then have this window presented:

然后我选择 Linux GCC(我不知道其余的是什么),然后创建一个新的源文件。

I then choose "Linux GCC" (I have no idea what the rest are), and creating a new source file.

问题是这样的:

The problem is this:

尽管您拥有所有必需的.h文件,但我在iostream文件中得到了未解决的包含可以在窗口的左窗格中(在包含下)看到。

I'm getting "Unresolved inclusion" to the iostream file, even though I have all the necessary .h files, as you can see in the left pane of the window (under "includes").

有人知道这可能是什么问题,以及如何解决此问题吗?

Does anyone know what might be the problem, and how to resolve this issue?

非常感谢!

编辑:

错误出现在窗口的底部窗格中,并且每当我尝试对其进行编译时,都会弹出此找不到二进制文件错误。

我还指的是未解决的包含。当我将鼠标悬停在 #include行上时,它会显示它。

the errors appear at the bottom pane of the window, and this "binary not found" error pops whenever I try to compile it.
There's also the "unresolved inclusion" I was referring to. it shows it when I hover with the mouse over the "#include" line.

推荐答案

该屏幕截图仅显示目录存在,而没有显示该目录

The screenshot only shows that the directories exist, not that the right files within them exist.

要解决以下依赖性问题:

To fix these kind of dependency issues:

sudo apt-get --install-suggests install eclipse-cdt

sudo yum install eclipse-cdt

这应该安装所有必需的依赖项。如果它安装了eclipse-cdt但未将其所有依赖项都安装在您的发行版上,那么这就是该发行版中的错误。

This should install all the necessary dependencies. If it installs eclipse-cdt but doesn't install all its dependencies on your distribution, well that's a bug in that distribution.

这篇关于Eclipse中未解决的包含的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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