Setting up eclipse in OS X (C++) ERROR: launch fai

2019-02-26 23:21发布

问题:

There are a million questions on this topic,and I have read all of them. I have installed eclipse juno on my computer, I run OS X Yosemite.

I just want to run a simple hello world program. But I can't,I don't know why.

I do build the project ,even if I do I get errors for everything, so running boost is out of question.

I used to use codeblocks, until it started crashing every 5 minutes,I cant work that way anymore.

I don't know what other details to give,I have the command line tools xcode installed,i have followed almost every blog and questions addressing this,I still can?t get it right.

EDIT:

language: C++ ERROR: launch failed binary not found

I have xcode command lines,jre,gcc.

回答1:

SO I solved my queries, here it goes:

  1. I realised that I first had to build my project once(just once) and then running it would be enough

  2. I still got the same error launch failed, i realised that eclipse could not locate the binary file that was built, I tried indicating the file directly,did not work, but what worked was setting the eclipse Parser as the mach-o-parser instead of the default elf.

  3. Another problem was to set the compiler from GNU to the mac compiler.

  4. For some people,downloading the 32-bit version worked,you could try this out.

  5. I also updated my version of eclipse from juno to luna(dint make a difference,did it anyway)

NOTE: for the above you need to have installed the JRE and Xcode command line tools

P.S I did not elaborate more as an individual google search will give you detailed steps,I wanted to indicate the problems and solutions that worked for me,the steps are already available.