Unable to open executable - xcode

13,909

Solution 1

I have also faced that problem. I have closed, restarted Xcode; deleted the application from device and reinstalled it again, then the problem has gone.
Make sure the library and project files is truly included if it is not include it shows in red color in this type of case some time it is in original folder and not in project so delete it and add it again.

Solution 2

In my case I had accidentally #imported the implementation file of a class instead of the header file (#import "MyClass.m" instead of #import "MyClass.h"). Unfortunately the error message for this innocent mistake is the opposite of helpful.

Solution 3

I might be a lil' late to this party, but same problem, solved it by going to Product > Scheme > Manage Schemes... Then simply delete current scheme and recreate a new one then try building again.

This is a good way of resetting any compilation settings you might have inadvertently changed.

Solution 4

In my case, I was trying to compile external library into my code and some of test c files in this library was added on "Compile Sources" on "Build Phases" tab. These files also had main() function which was causing it show "duplicate symbol" message. Once I removed these files from Compile Sources, project compiled successfully.

Share:
13,909
Filipe Mota
Author by

Filipe Mota

iOS Junior Developer

Updated on June 04, 2022

Comments

  • Filipe Mota
    Filipe Mota almost 2 years

    I'm getting this error...any idea how to solve it?

    GenerateDSYMFile /Users/fmota/Library/Developer/Xcode/DerivedData/PBTest-gvudadeakgzklbekugyiqyfyprlt/Build/Products/Debug-iphonesimulator/PBTest.app.dSYM /Users/fmota/Library/Developer/Xcode/DerivedData/PBTest-gvudadeakgzklbekugyiqyfyprlt/Build/Products/Debug-iphonesimulator/PBTest.app/PBTest
        cd /Users/fmota/Documents/Developer/Protobuf/PBTest
        setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
        /Developer/usr/bin/dsymutil /Users/fmota/Library/Developer/Xcode/DerivedData/PBTest-gvudadeakgzklbekugyiqyfyprlt/Build/Products/Debug-iphonesimulator/PBTest.app/PBTest -o /Users/fmota/Library/Developer/Xcode/DerivedData/PBTest-gvudadeakgzklbekugyiqyfyprlt/Build/Products/Debug-iphonesimulator/PBTest.app.dSYM
    
    error: unable to open executable '/Users/fmota/Library/Developer/Xcode/DerivedData/PBTest-gvudadeakgzklbekugyiqyfyprlt/Build/Products/Debug-iphonesimulator/PBTest.app/PBTest'
    
  • EHarpham
    EHarpham over 9 years
    Lifesaved this worked for me. I was transferring an xcode 5 ios 7.1 file to xcode 6 when i started seeing problem