Reputation: 61
My development environment with Xcode 7.2.1
, CocoaPods 1.0.0
and GoogleMaps 1.13.2
I can build code successful to generate a XXX.ipa file and install in my iPhone 6 Plus to work correctly.
But when I run Xcode simulator by item "iPhone 6" or "iPhone 6 Plus" always get the information as below
"xxxx duplicate symbols for architecture x86_64" "linker command failed with exit code 1 (use -v to see invocation)"
I use the following solutions still can't fix it
Build Options -> Enable Bitcode -> set "No"
Remove -ObjC from Other Linker Flags
project Targer -> Build phases -> compile sources, ckeck no duplicate files
Make sure I haven't #imported a .m file
I am wondering if there are any other method to solve this, help would be appreciated thanks.
Upvotes: 6
Views: 12723
Reputation: 5107
I resolved this issue by removing the -all_load
flag in the Build Settings-> Other Linker flags
.
Upvotes: 0
Reputation: 1555
I have faced similar kind of issue.
In my application I have run my code and created ipa before two day. And today when I am trying to run same code without any changes I am getting:
ld: 102 duplicate symbols for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
The solution for this duplication Linker error can be solved by Remove all of your classes from compile sources, then click the + button and search for the term '.m'
. Highlight every class, then click add. Build and run again.
Upvotes: 1
Reputation: 121
This problem can also be occurred in case you import ".m" file instead of ".h" by mistake. I know it may be seemed as a stupid advise but this is what I had done in my case.
Upvotes: 0
Reputation: 128
This error generally occurs when you have linked any library or file twice. In the error desciption, the name of the duplicated file will be listed, you can search and and make sure you don't have duplicates. If you find duplicates, remove reference to one of them to play safe
Upvotes: 2