Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've spent hours this evening trying to get the hello world C++ App to run and no luck.

What I've Done: 1. Installed XCode and C++ for Eclipse as per 2. Tested that XCode works and can open it

What Happens: 1. When I create a new C++ Hello World project in Eclipse, I have no Run As options. Run As simply does not appear.

enter image description here

Other Observations: 1. I am not convinced that GCC is really installed on my Mac because when I run "gcc -v" from a terminal I get "-bash: gcc: command not found" 2. When I attempt to go to "/bin/usr/gcc/" there is nothing (which implies that GCC is not installed but I know I have XCode installed).

share|improve this question
Have u tried the run button at the top-center? – Karthik T Nov 23 '12 at 5:30
Yes. "Unable to Launch. The selection cannot be launched". Why is there no C++ launch option? – eb80 Nov 23 '12 at 5:57
up vote 1 down vote accepted

Install the commandline tools from XCode.

share|improve this answer
This resolves the "gcc -v" commandline issue which is a step in the right direction. For documentation, the Help is at… However, I still do not see any Run options available to me within Eclipse. – eb80 Nov 23 '12 at 5:56
Just to share knowledge, I also committed this error: I did not include all the downloads. The main Eclipse overview page is deceptive as it doesn't include all of what you need in its instructions. Now I have the "C++" Run As option but there is another erorr "Launch Failed. Binary Not Found" – eb80 Nov 23 '12 at 6:11
Just to close out the loop, everything works now. I did not right click on the project, click "Build Project" first. I am a new to C++ now so I just assumed you could run it like you do in Java. Do you have to build before each run? – eb80 Nov 23 '12 at 6:14
To summarize for documentation, I needed to: 1. Download XCode 2. Download XCode commandline tools 3. Download the full Eclipse plugin list for C++ (documentation is very deceptive). – eb80 Nov 23 '12 at 20:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .