I have several files listed in compile sources
and it doesn't want to sort by name so I'm stuck having to sort through them by hand looking for duplicates. Is there an easier way to do this? It's only ~100 files but it would be nice to know a more efficient way.
Error example:
...
duplicate symbol _OBJC_CLASS_$_AppDelegate in:
/Users/xxxx/Library/Developer/Xcode/DerivedData/JOMiPhoneApp-ginylosefnqdjpfprrdipmpewzun/Build/Intermediates/MyApp.build/Debug-iphoneos/MyApp.build/Objects-normal/arm64/AppDelegate-215945057A88172.o
ld: 34 duplicate symbols for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
If you pull up the report navigator, select the build with the warning, and then expand the console details for the failed compile, it should describe precisely where both of the duplicate references are (in my example, in AppDelegate.o
and ViewController.o
, the latter because I "accidentally" did an #import
of AppDelegate.m
rather than AppDelegate.h
in ViewController.m
):
In the project navigator in left panel, click on the search tab and look for AppDelegate
. Anyway, you can search through your entire project like so:
You can also search for a symbol by typing command+shift+O (the letter "Oh"):
This last approach will only find it if you have the AppDelegate
symbol defined in different source files, but it's another avenue to consider.
Click on the Report Navigator tab in Xcode (command8), then click on the build that shows the red build error icon. It should show you more specifically where it is finding the error. If you want even more information, click the “hamburger”-style button on the right:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With