12

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'
mattjgalloway
  • 34,792
  • 12
  • 100
  • 110
Filipe Mota
  • 340
  • 1
  • 4
  • 21
  • Does your app compile? This running in a virtual machine of sorts or you running this on mac iphone simulator? – Jeremy Jan 05 '12 at 16:46
  • No, it doesn't compile. I'm using a Mac and the iPhone Simulator. – Filipe Mota Jan 05 '12 at 17:21
  • 1
    Trying running _Clean_ using command-shift-K, then uninstall the app from simulator (if exists), then try rebuilding/running and see if that helps. If you still get the same issue, try modifying the deployment target and see if anything changes. – Jeremy Jan 05 '12 at 17:38
  • Also, possibly restart your mac. I've seen cases where debugger doesn't unlock the executable and sometimes causes a conflict. – Jeremy Jan 05 '12 at 17:41
  • 1
    No, samething... I forgot to mention that it's also giving this [error](http://stackoverflow.com/questions/8745661/undefined-symbols-for-architecture-i386-using-protobuf/8745766#8745766), don't know if it's related... – Filipe Mota Jan 05 '12 at 18:04

9 Answers9

6

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.

Manobala
  • 274
  • 2
  • 7
4

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.

Josh Liptzin
  • 746
  • 5
  • 12
4

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.

JackyJohnson
  • 3,106
  • 3
  • 28
  • 35
  • Lifesaved this worked for me. I was transferring an xcode 5 ios 7.1 file to xcode 6 when i started seeing problem – EHarpham Jan 18 '15 at 16:46
3

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.

sarabdeep singh
  • 878
  • 1
  • 11
  • 16
0

I solved this by deleting the path specified in both Header Search Paths and Library Search Paths, found under Targets - Build Settings - Search Paths. The application now builds and runs cleanly on the iOS simulator.

I do not yet have real-device testing capability, so we'll see what happens when I get to that point.

Jeanne
  • 87
  • 1
  • 8
0

I was getting the same error dialog. It turns out I had two consts of the same name declared in different files and the compile was failing with no meaningful error output, only this problem. After doing the DWARF thing discussed here I was able to get better error output that helped me find the problem

Community
  • 1
  • 1
puzzl
  • 833
  • 9
  • 19
0

I had accidentally added the same source files to my Project in Xcode twice (a header and an implementation file. Look for clues in the error message as to which files might be duplicates.

Deleting the duplicate copy (Remove References, not Move to Trash) solved my issue.

Craig Conover
  • 4,710
  • 34
  • 59
0

And here's yet another cause: repeated use of [unowned self] inside of nested blocks.

puzzl
  • 833
  • 9
  • 19
0

Another thing to check -- if you have "Continue build after errors" set to YES, then a compile error (which you may have missed in the issue pane) can eventually lead to this error. Fix the compile error to resolve it.

software evolved
  • 4,314
  • 35
  • 45