Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.0k views
in Technique[技术] by (71.8m points)

c++ - Unresolved inclusion in Eclipse

I have Eclipse version 3.8.1, with which I write Java code. I recently started writing in cc++, and I'm having some troubles when trying to install the CDT (CC++ 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:

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: enter image description here

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

The problem is this: enter image description here

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?

Thanks in advanced!

edit:

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.

enter image description here

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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

or on yum-based distributions

sudo yum install 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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...