4

I recently configured Eclipse CDT for C++ development. I can build projects and no errors show up in the project.

When I try to run the project I get an error that states: lunch failed, No binaries found. This is the basic hello word C++ project that I created using the Eeclipse option menu FileNewC++ ProjectExecutableHello world C++ Project.

I tried following this solution. It had no effect.

I tried cleaning the project and building the project multiple times.

I set up CDT with Eclipse v4.2 (Juno) on my other computer with without any problems.

I had previous problems configuring Eclipse which I don't think are related, but details can be found here.

So the EXE file is in the debug folder, but for some reason Eclipse refuses to run it. It's like it does not see the EXE file. How can I fix this?

Update

I have looked at the other projects that execute successfully and noticed that there is a binaries folder in them that does not exist in the projects that don't work. (Even in the projects that don't work I can launch the EXE file manually by going to the debug folder which contains the EXE file after build).

This means that for some reason Eclipse is not creating the binaries folder with the EXE file. I tried creating the folder manually and placing the EXE file in it, but the folder has a special look when eclipse creates it and it doesn't work when you just create the folder manually. The folder just seem to contain the same file as the debug folder.

This is really frustrating.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Xitcod13
  • 5,949
  • 9
  • 40
  • 81
  • just to clarify. The .exe file appears under the debug folder in the eclipse. On top of that i can actually go to the folder and double click the file and it works. dafuq eclipse. – Xitcod13 May 02 '13 at 00:32

7 Answers7

4

Do you see the file under "binaries" virtual folder in your Project Explorer?

It looks like you "binary parser" is not picking the executable. Do you use CDT-generated makefile or the one you wrote yourself? Also check if "PE Windows Parser" and/or "Cygwin PE Parser" are selected when you open project properties, navigate to "C/C++ Build"/Settings page and "Binary Parsers" tab.

Eugene
  • 9,242
  • 2
  • 30
  • 29
  • 2
    It seems that i had to change the toolChainEditor under Project>properties>C/C++ Build>Toolchain editor. Then had to change it to Cygwin GCC – Xitcod13 May 10 '13 at 08:33
2

I just had the same error, and here is what I did:

Proper binary parser must be selected so Eclipse can recognize the executable: Select the project, then right click.

Project->Properties->C/C++ Build->Settings->Binary Parsers, PE Windows Parser (or you can select Cygwin if you use that compiler).

That worked for me at least for Cross compiler.

In Linux I use Elf parser.

Nenad Bulatović
  • 7,238
  • 14
  • 83
  • 113
1

I had the same problem. It's just solved by saving my .c file! Only clicking Ctrl+S in my .c file and the problem solved. I think the reason was the program was building nothing! Now it generates Binaries folder and works fine!

Gamal Othman
  • 93
  • 10
0

Eclipse Mars + CDT. Windows 7 64bit. This might be old, however if some new guy stuck on this problem - mine was that as.exe was somehow corrupted, so it failed to launch thus didn't produce *.o file out of *.s file, and followingly ld had nothing to do because of there is no *.o file, and followinglly no *.exe. So it looks like it builds but no executable creates because of this. I fixed it by simply downloading latest MinGW binary tools, and overwriting all the /bin and /mingw32 files.

WhiteTiger
  • 31
  • 3
0

You have to use Ctrl+B to build the project. It automatically creates the binaries for you.

Ramana
  • 49
  • 4
-1

If you're using Eclipse for C++ for the first time, you have to build the program before you run the program. To build the project, menu ProjectBuild the project, and then run I think this will do it.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
-1

When installing the eclipse I chose to setup with only MinGW. Once I wanted to start a new project, there was no MinGW option, I created a project and I got the same problem with the question title. I changed the Properties > C/C++ Build > Tool Chain Editor to MinGW GCC later on. This solved my problem.

loki
  • 9,816
  • 7
  • 56
  • 82
thyship
  • 1
  • 2