Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 http://www.banym.de/mac/install-eclipse-cc-juno-on-mac-os-x 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 http://www.tech-recipes.com/rx/726/mac-os-x-install-gcc-compiler/ 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
add comment

1 Answer

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 developer.apple.com/library/mac/#documentation/DeveloperTools/… 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: eclipse.org/forums/index.php/t/226391 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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.