3

Suddenly my program runs and compiles without error but will not open the executable. I get error dialog:

Error Starting Executable... No executable file specified. Use the file or exec-file command

I think this may have started when I created a "Workspace" of the same name. I did searches for the error but found nothing that made any sense.

I would hate to have to copy my work over to a new project because of this. Help!

Could this be a bug?

Gnarlodious
  • 304
  • 2
  • 4
  • 16

3 Answers3

2

If you are using GDB as default debugger (verify it under Product-Edit Scheme menu) you must specify the executable path that is contained under the app folder (Executable.app/Contents/MacOS/Executable).

Gian Luigi
  • 21
  • 2
0

Gian Luigi is correct. This is the output from gdb if you just run gdb and then type run.

I tried adding -exec=/path/to/MyApp.app/Contents/MacOS/myapp to the debugger command line but it didn't have any effect.

The easiest solution is to use LLDB instead.

Timmmm
  • 88,195
  • 71
  • 364
  • 509
0

Did you add target to your project? If not this might be the problem. Click the project name and then click plus button, then add your target.

quaertym
  • 3,917
  • 2
  • 29
  • 41