20

I am facing some problems regarding eclipse for c/c++. I am trying to create a new project, I provide the code, and after running the code I get this error:

The program file specified in the launch configuration does not exist
C:\Users\elisabeth\workspace\mm\Debug\mm.exe not found

Please notice that I am working with spice toolkit; I set the path for the "include" files and the libraries, but still I can not have a result.

What causes this error and how can I resolve it?

KatieK
  • 13,586
  • 17
  • 76
  • 90
user1873644
  • 201
  • 1
  • 2
  • 3
  • 1
    Well, "include" is not usually used for find the executable. You should set the working directory and making sure that ouput directory is the same and that mm.exe is really there. If there 's a bug in project creation you can always try to adjiust those 2 paths manually. (nothin extraordinary difficult, but always backup changes). – CoffeDeveloper Dec 03 '12 at 20:45

9 Answers9

43
  1. Right click on your project --> Properties
  2. Run/Debug settings
  3. Delete whatever is set as "launch configuration for '........'
  4. Project --> Clean
  5. Project --> Build Project
Nenad Bulatović
  • 7,238
  • 14
  • 83
  • 113
9

You can create a run configuration. Go to Run > Run Configurations. Click New button, fill C/C++ Application field, i.e., insert path to your executable. The new configuration will appear in the list which appears when you click to the arrow next to run button.

Of course this assumes your can build without problems, otherwise you won't see an executable to point to.

incrediblehulk
  • 409
  • 2
  • 11
3

You can clean the project, build it again and run it as a local C/C++ application. Simplified steps as follows,

  1. Right click on the project
  2. Clean Project
  3. Again Right click on the project
  4. Build Project
  5. Again Right click on the project
  6. Run As ->
  7. Local C/C++ Application
Tahseen
  • 87
  • 2
  • 9
1

As the error reads:

C:\Users\elisabeth\workspace\mm\Debug\mm.exe not found
  1. First of all you need to check whether there is an executable "mm.exe" in your Debug folder. (Of course, it is not there and that is why the error)

  2. Go to Project > Clean and you should see some files being deleted from your Debug folder

  3. Go to Project > Build Project and you should see some new files being generated e.g. mm.d, mm.o, mm. This "mm" is probably the executable you're looking for

  4. Now that you know what your executable is, you should tell eclipse what file to execute instead of mm.exe. Go to Project properties and in run debug settings create a new configuration (or edit an existing configuration, if there is one already). In this configuration, in main tab, in C/C++ Application specify a full path to "mm". Which, in your case is - "C:\Users\elisabeth\workspace\mm\Debug\mm" A better way to do this in eclipse is:

    ${project_loc}/"your folder"/"your executable file"

e.g.${project_loc}/Debug/mm

Ankur
  • 5,086
  • 19
  • 37
  • 62
sdevikar
  • 437
  • 6
  • 20
1

what worked for me is file->refresh

then do the Debug configuration again by choosing the right c/c++ binary again.

Samer
  • 1,923
  • 3
  • 34
  • 54
0

Avoid troubles with configuration by going into Project properties > C/C++ build > Refresh Policy and specify your project folder. The configuration option "Search project" will show a correct folder then and you will see whatever you build there - Debug, Release or both. You don't want to specify the folder using Browse option every time you import project or switch configurations.

Vlad
  • 4,425
  • 1
  • 30
  • 39
0

As this is the first SO discussion that appears for this topic on Google and none of the answers solved the problem my students were having, I would like to mention the solution we eventually found from this answer:

  1. Open project properties (Right click on your project, choose Properties on the menu)
  2. C/C++ Build -> Settings
  3. Click on Binary Parsers tab and check PE Windows Parser
  4. Keep clicking Move Up until it is at the top

This had been set to Elf, even though we were using a freshly downloaded Windows version of Eclipse.

Community
  • 1
  • 1
0

sometime missed closing curly brace can be part of a problem. Make sure prototype your function at the beginning of the file. Then right click your project in the left side bar. click clean project. then click build project and finally run project

0

I encountered similar issues and their related problems a few days ago. Finally, I found out that, just because I had moved my project folder (workspace folder of Eclipse) to another place so Eclipse could not find what its need as usual.
Solution: I just set the workspace to my new place (Hey Eclipse, my workspace now is here) : Menu "File" -> "Switch workspace" -> "Other..." -> click "Browse..." button and point to new place then click "Select Folder" button and click "Launch" button.

Nice day.