RonK
RonK

Reputation: 9652

Getting Started with Eclipse CDT

I have downloaded the latest Eclipse CDT release (Helios) and wanted to try my luck with some C++ programming (haven't done that in ages).

I tried to do the "Hello World" project, but I got stuck quite fast. First thing - the #include <stdio.h> and #include <stdlib.h> got marked with an 'Unresolved Symbol' warning. So I found the place where I can add include paths and pointed it to these headers from the Visual Studio installation I have.

After that, it looked fine but:

  1. I don't see compilation errors/warnings in the Problems tab.
  2. I cannot run the code - I get 'Launch failed. Binary not found' error

My question is simple - what are the steps I really need to do to get my code compiled, linked and executed? I tried looking for it on Eclipse's site, but didn't find any reference to that.

Upvotes: 3

Views: 2097

Answers (3)

rickstockham
rickstockham

Reputation: 80

I'm making a guess here, that your are running on Windows, because that particular error seems to be a windows related one.

You seem to be missing the basic toolchain needed by the CDT to actually build the project. You need some files Before You Get Started. I suggest the mingw installer, as it is simple, and lets you actually build Windows compatible binaries.

Check out the link above, and then make sure your project links to the toolchain. Hope that helps.

Upvotes: 1

JimD
JimD

Reputation: 41

I was getting the same error until I ran the "Build All" command. That command created two new folders, Debug and Release. Then when I clicked the "Debug" button, it asked me which one I wanted to run and I selected "Debug" and it ran perfectly.

It seems like the binary it couldn't find was created from the "Build All" command.

Upvotes: 0

Itamar Katz
Itamar Katz

Reputation: 9655

A starting point could be:

  • File -> New -> c++ project
  • Type a name for the project, select Hello World c++ Project under Project Type and click Finish.
  • Right click on the project -> Run As -> Local C++ application (or just click the Run button on the toolbar).

Upvotes: 0

Related Questions