Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mach-O Linker Error on Xcode 4.6

I have an iOS app on Xcode 4.6 and when I recently tried to build and run in the iPhone 6.1 simulator I got a "Mach-O Linker Error." It continued to say:

ld: 17 duplicate symbols for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Does anyone know how to solve this?

Thanks so much!

like image 267
user1253582 Avatar asked Feb 20 '13 21:02

user1253582


3 Answers

Just go to "Build Phases" -> "Compile Sources" and look for duplicate of classes.

like image 135
edzio27 Avatar answered Nov 16 '22 07:11

edzio27


Check if you have "*.m" files in your #import ! It appears that was my mistake...

like image 17
Arnaud Nelissen Avatar answered Nov 16 '22 08:11

Arnaud Nelissen


  1. Quit Xcode
  2. Restart the System
  3. Select Xcode -> Preferences -> Locations
  4. In Locations, you will see 'Derived Data'. Click on the arrow icon right next to the path.
  5. This will open a folder containing 'Derived Data', delete it.
  6. Clean the Product and Run

    if still not works then

    Build Settings > Enable Bitcode > No enter image description here

like image 7
Azhar Avatar answered Nov 16 '22 07:11

Azhar