Home » Language IDEs » C / C++ IDE (CDT) » Difficulty getting started
|Difficulty getting started [message #871126]
||Fri, 11 May 2012 03:15
| Shane Wells
Registered: May 2012
Windows 7, |
recently installed Eclipse.
Previously had eclipse on a Windows Xp machine, which may have been configured by someone else. The problem is, when I open project spaces and source files that worked fine on my previous computer, they now give all kinds of errors, and I can't find a compile button anywhere any more.
More specifically, for my inclusion statements of iostream, string and fstream.h, it says of all of them: unresolved inclusion. For using namespace std; it says symbol std could not be resolved. Have I not loaded a library or something?
In the problems dialogue, it lists three problems, one of which is the previously stated std problem and two which are Program "make" is not in PATH. I have downloaded and installed MingW, but I have no idea if it needs configuring or how to do that. What configuring, if any, needs to be done to MingW?
If I hit run, it says the selection cannot be launched and there are no recent launches. How do I compile the individual file that is currently open?
Where do I begin?
[Updated on: Fri, 11 May 2012 20:11]
Report message to a moderator
|Re: Difficulty getting started [message #871150 is a reply to message #871126]
||Fri, 11 May 2012 07:19
Registered: April 2010
About 90% of people posting this type of question seem to have no clue|
of some very basic facts. Hopefully this list will be useful:
(1) Eclipse in general:
a. Eclipse is a so-called "IDE framework". It is available for a lot of
platforms (e.g. Win/Unix/Mac). It is written in Java. Therefore, to run
Eclipse, your computer must have a properly fitted and configured
version of the 'Java Runtime Environmment' (JRE) installed. If you also
want to develop in Java, you also need the 'Java Development Kit' (JDK).
Note that the JDK usually already comes with the JRE included.
b. Different "features" and "plugins" can be added to the Eclipse IDE
framework. With its open architecture, you can do almost anything you
like with Eclipse. Eclipse "itself" can do almost nothing. The
"features"/"plugins" do the actual work. But even these need help.
c. If you want Eclipse to do something that is not already implemented,
it is primarily _your_ responsibility to get it done. Or you can try to
find and pay someone or some organization to implement it for you.
d. Luckily some people and companies have already invested huge amounts
of time and resources _and_ made their efforts "freely available", so
you can enjoy a lot of ready-made stuff. But this is not your 'right',
this is a granted _privilege_. So better be nice to these people.
(2) Programming languages:
a. To compile and run (e.g.) a C/C++ or Java "program" or "application"
(or whatever you name it), usually its "source code" must first be
"compiled" and "linked" to something that can be "executed".
b. For Java and C/C++ (e.g.), the Eclipse "plugins"/"features" usually
don't do any actual compiling and linking themselves.
c. For compiling and linking, a "plugin" invokes a language-specific
"toolchain" that must be installed and configured separately, including
any necessary "header files", "libraries", etc.
d. You can actually "compile" and "link" for a different computer than
the one you develop with. This is called "cross-compiling".
(The information "it does not compile" does not help: _what_ language/s
and _which_ toolchain for _which_ target architecture?)
e. To make matters more ..uhm... 'interesting', some of the toolchains
want to "live" in a Unix-like environment. (Often they were originally
developed on Unix or Linux, so this is not really a big surprise.)
f. For Windows, two "Unix-like environment simulations" exist, one is
"Cygwin" (which simulates a complete environment independent from the
individual tool program), one is "MinGW" (which simulates an Unix-y
operating environment for each individual tool program).
(3) OS / Eclipse / Toolchain installation and run problems:
a. If someone else originally installed your setup, and you had to
change operating systems or computers, then first talk to _them_ about
what needs to be done. (Maybe they can give you a "setup" document!?)
b. If you can't do that, then you need to find out for yourself which
components need to be installed in which order. (Again, check if the
other person left a "log file" or any documentation about the setup.)
c. No, this is not "asked too much". Some people think they can
install/use a sophisticated toolchain "developing software" without
knowing how it works 'under the hood'. This is analog to "running a
factory" without a clue about how it works. It may work for some time,
but in case of any problem, you are just left with the broken debris.
d. Invest some time and find out about the Eclipse/toolchain
installation and layout you need. And document it.(!)
e. Luckily there are numerous websites and other resources where you
_can_ find help. But you _will_ have to search for the information. Only
you can do this, because only _you_ know EXACTLY what type of target
architecture you develop for, which OS/Eclipse/Toolchain/* versions you
use, etc., etc., etc. Everyone else can only guess and potentially waste
their and your time in the process.
f. If you ask any question in forums (like this one), at least make an
effort to help the people help you. You don't want your time wasted.
Others have the same right.
(4) Now to Shane's specific question:
a. You told us you are using Win7, your workspaces don't work, the
compile button is missing and your includes don't work.
(Cool. Better than some.)
b. This only leaves about 50+ questions _unanswered_.
c. And more: answering these questions will _very_ likely enable you to
solve your problem yourself!
d. But how to find out how and which questions to ask? Luckily there is
an "FAQ" for that. Eric Raymond has lots of useful tips how to research
problems and get maximum response for questions (if still necessary):
(And yes, Eric's tone might be a bit ego-bruising sometimes. But the
heck, if I have an install problem, _I_ re-read his FAQ. Usually after
following his advice, I don't need to ask the question in public
anymore. In the cases where I still have to do it, usually the responses
are good and fast.)
Hope it helps. -H
|Re: Difficulty getting started [message #871299 is a reply to message #871150]
||Fri, 11 May 2012 20:02
| Shane Wells
Registered: May 2012
1 through 3 did not substantially add to my knowledge. I am aware that set up is required, I have looked at the help pages on the eclipse site, and followed their instructions. This did not have any notable effect.|
The person that set it up for me previously is no longer available. I am aware my question is vague, but I have zero idea why it isn't working, so I don't know what 50 questions I should be asking, which is why I am posting on a forum dedicated to the product I'm asking about.
Really what I need is an installation manual. I am, in certain respects, just starting out programming, and while I have several (oldish) books on C++, I have no other resources but the internet. The FAQ says RTFM, but as far as I can tell, there is none, so I'm just expected to magically know all the settings and adjunct software that I need?
None of the topics in that FAQ in any way help me to provide additional information. What I did was very simple. If something doesn't work from step one, I'm not sure how I'm supposed to provide more information.
It's too bad that in spending all of that time writing stuff I mostly already knew, that you didn't come within a mile of helping clarify the problem at hand.
[Updated on: Fri, 11 May 2012 20:12]
Report message to a moderator
|Re: Difficulty getting started [message #896826 is a reply to message #871126]
||Thu, 19 July 2012 23:24
| kessel haus
Registered: July 2009
Am 11.05.2012 05:15, schrieb Shane Wells:|
> running Windows 7, recently installed Eclipse. Previously had eclipse
> on a Windows Xp machine, which may have been configured by someone
> else. The problem is, when I open project spaces and source files that
> worked fine on my previous computer, they now give all kinds of errors,
> and I can't find a compile button anywhere any more.
> More specifically, for my inclusion statements of iostream, string and
> fstream.h, it says of all of them: unresolved inclusion. For using
> namespace std; it says symbol std could not be resolved.
> In the problems dialogue, it lists three problems, one of which is the
> previously stated std problem and two which are Program "make" is not in
> PATH. I have downloaded and installed MingW, but I have no idea if it
> needs configuring or how to do that.
> If I hit run, it says the selection cannot be launched and there are no
> recent launches.
> Where do I begin?
How about, installing MinGW? Unless it is already installed.
You have several options:
* Get it from www.mingw.org
You should install mingw to the default path C:\MinGW, which CDT
detects then automatically.
* Use an installation like from www.equation.com. For this one, the
Internal Build would work, but Makefile based projects would need to
rely on windows command line tools, like del instead of rm etc.pp.
Also, when using this installation from euqation.com, you should add
the binary paths to PATH in order to have CDT run make,gcc,g++ etc.
Even though, cygwin is supported by CDT, I personally stay away from it,
since it is usually the base of many problems.
I believe, even the MSVC compiler is supported as build tool, but there
is no debugger for it, afaik.
Now, with one of these compilers installed, you should be able to create
and build C/C++ projects with CDT.
Use the project wizard ("Create C/C++ project" and not a "General"!) to
create them, select the target type like executable, shared/static lib,
and select the compiler in the right pane.
Current Time: Sun May 01 02:39:56 GMT 2016
Powered by FUDForum
. Page generated in 0.08939 seconds