Xcode 4 - Error starting executable file

I am working on a project in Xcode 3.2.5, and today I tried translating it to Xcode 4.0. It compiles just fine; I can navigate and run .app without a hitch (as expected). The only thing disgusting is the fact that Xcode cannot start the application and displays the following error when trying:

"Error starting executable file. No executable file specified. Use the" file "or" exec-file "command (image not available)

I looked at the Project and Xcode settings and have been working in search engines for half a year, but all I can find is dead ends and people beat other people about Apple NDA violation. FYI Xcode 4 has been released and is no longer under the NDA.

Should I just start a new project and copy it in my source? It sounds wrong, but brute force works when brute force works.

Thanks in advance

+6
xcode xcode4 macos
source share
6 answers

I believe that the schemes that he set up for you based on your v3 targets and build settings may not be entirely correct. In the diagrams menu, select edit the current diagram, then select the "Run" action from the list and make sure that the corresponding exectuable is selected.

+11
source share

Robert Harrivo . Do not delete my post without telling me why you deleted it. That's rough.

I ran into the same problem as this question, so I spent my time identifying the problem, reproducing the problem, narrowing it down and explaining as much as I could to prevent this from happening - as well as the general frustration that comes with a problem like this (he hit me on 2 different versions of Xcode in 2 weeks).

If you are going to delete my post, at least take the time to try to answer the question of how I tried to do this.

Now, to the answer that actually says how this problem can be created and how to avoid it.

I just wanted this to create an iOS app. What for? I renamed my target executable.

Just test this by checking out a new copy of the source and rebuild.

The application works fine on my device.

Went to Xcode 4.2, renamed the target. Launch the app. "Error starting executable file ..."

I changed the file name back. The same error.

I removed and started the application again, and it started.

Renamed the application, cleaned it, and ran it again. Not much luck.

Do not rename your application by renaming the target.

This is such a stupid restriction. Apple allows you to rename the target application, but it prevents the launch of your application on the device.

EDIT: I have not tested any code, but now I can not test and create and run any application without this. How do you get the / xCode device from this state as soon as you receive it?

Even the application now crashes when launched in int retVal = UIApplicationMain (argc, argv, nil, nil);

This is in Xcode 4.2 on Snow Leopard, but I ended up in the same state with Xcode 3 on another machine last week.

Edit 2: reboot device, reboot my Mac. Built and launched in the simulator first and then on the Gen4 iPod touch. He works.

+3
source share

I had this problem when porting a project from Xcode 4 to 4.1, and it ended up Target "Product Name" being different in debug and release settings. The deduction from when I changed the name of the product many versions back. Therefore, check that ...

+2
source share

I reduced Xcode from 4.2 to 4.1 only to encounter an error when building and running on the device: "Error starting executable file. I donโ€™t know how to work ...". I cleaned up the project (Xcode> Project> Clean) and cleared the build folder (Xcode> Project> (hold key) Clean Build Folder). After that, I had to build again, and iOS 5 works on iPod touch 4g.

+1
source share

Well, that surely sounds like a whole family of bugs behind this error message!

I got an error after loading the Xcode 3 project in 4.2.x for the first time.
None of the above tips worked for me, however what I ended up doing was switching from GDB to LLDB .

This is fixed.

It seems that the new path to the executable file was not properly recognized by GDB (i.e. once locally in PROJECT / build / Debug / ... in Xcode3, but now in the usual folder with the Xcode 4 folder it was still looking for the executable in the assembly folder relative to the project sources)

+1
source share

I duplicated the target and renamed the copied to a different name, I received this error message. What I did was clear the project, exit Xcode, restart Xcode, and then run it on my device.

0
source share

All Articles