I get duplicate symbols error after I updated my Xcode
. (find the code down) Does anybody get this too? And how could be solved?
I tried to remove -ObjC
linker flag from the "Other Linker Flags" section, check after imported .m
instead of .h
, switch the "No Common Blocks" compiler setting to NO, I went to Targets -> Build Phases -> Compile
sources and no duplicates there, tried all with no results.
Any other ideas?
duplicate symbol _space in: /Users/a/Library/Developer/Xcode/DerivedData/SMAP-bshetjpaaresiudzvoubtutnfvuq/Build/Intermediates/SMAP.build/Debug-iphoneos/SMAP.build/Objects-normal/arm64/SearchView.o /Users/a/Library/Developer/Xcode/DerivedData/SMAP-bshetjpaaresiudzvoubtutnfvuq/Build/Intermediates/SMAP.build/Debug-iphoneos/SMAP.build/Objects-normal/arm64/FollowingUserViewController.o duplicate symbol _space in: /Users/a/Library/Developer/Xcode/DerivedData/SMAP-bshetjpaaresiudzvoubtutnfvuq/Build/Intermediates/SMAP.build/Debug-iphoneos/SMAP.build/Objects-normal/arm64/SearchView.o /Users/a/Library/Developer/Xcode/DerivedData/SMAP-bshetjpaaresiudzvoubtutnfvuq/Build/Intermediates/SMAP.build/Debug-iphoneos/SMAP.build/Objects-normal/arm64/ChatViewController.o duplicate symbol _space in: /Users/a/Library/Developer/Xcode/DerivedData/SMAP-bshetjpaaresiudzvoubtutnfvuq/Build/Intermediates/SMAP.build/Debug-iphoneos/SMAP.build/Objects-normal/arm64/SearchView.o /Users/a/Library/Developer/Xcode/DerivedData/SMAP-bshetjpaaresiudzvoubtutnfvuq/Build/Intermediates/SMAP.build/Debug-iphoneos/SMAP.build/Objects-normal/arm64/MessagesNotifications.o duplicate symbol _space in: /Users/a/Library/Developer/Xcode/DerivedData/SMAP-bshetjpaaresiudzvoubtutnfvuq/Build/Intermediates/SMAP.build/Debug-iphoneos/SMAP.build/Objects-normal/arm64/SearchView.o /Users/a/Library/Developer/Xcode/DerivedData/SMAP-bshetjpaaresiudzvoubtutnfvuq/Build/Intermediates/SMAP.build/Debug-iphoneos/SMAP.build/Objects-normal/arm64/AppDelegate.o duplicate symbol _space in: /Users/a/Library/Developer/Xcode/DerivedData/SMAP-bshetjpaaresiudzvoubtutnfvuq/Build/Intermediates/SMAP.build/Debug-iphoneos/SMAP.build/Objects-normal/arm64/SearchView.o /Users/a/Library/Developer/Xcode/DerivedData/SMAP-bshetjpaaresiudzvoubtutnfvuq/Build/Intermediates/SMAP.build/Debug-iphoneos/SMAP.build/Objects-normal/arm64/PicturesCell.o duplicate symbol _space in: /Users/a/Library/Developer/Xcode/DerivedData/SMAP-bshetjpaaresiudzvoubtutnfvuq/Build/Intermediates/SMAP.build/Debug-iphoneos/SMAP.build/Objects-normal/arm64/SearchView.o /Users/a/Library/Developer/Xcode/DerivedData/SMAP-bshetjpaaresiudzvoubtutnfvuq/Build/Intermediates/SMAP.build/Debug-iphoneos/SMAP.build/Objects-normal/arm64/SMAPMainViewController.o duplicate symbol _space in: /Users/a/Library/Developer/Xcode/DerivedData/SMAP-bshetjpaaresiudzvoubtutnfvuq/Build/Intermediates/SMAP.build/Debug-iphoneos/SMAP.build/Objects-normal/arm64/SearchView.o /Users/a/Library/Developer/Xcode/DerivedData/SMAP-bshetjpaaresiudzvoubtutnfvuq/Build/Intermediates/SMAP.build/Debug-iphoneos/SMAP.build/Objects-normal/arm64/CheckUserTypeViewController.o duplicate symbol _space in: /Users/a/Library/Developer/Xcode/DerivedData/SMAP-bshetjpaaresiudzvoubtutnfvuq/Build/Intermediates/SMAP.build/Debug-iphoneos/SMAP.build/Objects-normal/arm64/SearchView.o /Users/a/Library/Developer/Xcode/DerivedData/SMAP-bshetjpaaresiudzvoubtutnfvuq/Build/Intermediates/SMAP.build/Debug-iphoneos/SMAP.build/Objects-normal/arm64/SmaptersNearYou.o duplicate symbol _space in: /Users/a/Library/Developer/Xcode/DerivedData/SMAP-bshetjpaaresiudzvoubtutnfvuq/Build/Intermediates/SMAP.build/Debug-iphoneos/SMAP.build/Objects-normal/arm64/SearchView.o /Users/a/Library/Developer/Xcode/DerivedData/SMAP-bshetjpaaresiudzvoubtutnfvuq/Build/Intermediates/SMAP.build/Debug-iphoneos/SMAP.build/Objects-normal/arm64/PostSlider.o duplicate symbol _space in: /Users/a/Library/Developer/Xcode/DerivedData/SMAP-bshetjpaaresiudzvoubtutnfvuq/Build/Intermediates/SMAP.build/Debug-iphoneos/SMAP.build/Objects-normal/arm64/SearchView.o /Users/a/Library/Developer/Xcode/DerivedData/SMAP-bshetjpaaresiudzvoubtutnfvuq/Build/Intermediates/SMAP.build/Debug-iphoneos/SMAP.build/Objects-normal/arm64/UserSettings.o duplicate symbol _space in: /Users/a/Library/Developer/Xcode/DerivedData/SMAP-bshetjpaaresiudzvoubtutnfvuq/Build/Intermediates/SMAP.build/Debug-iphoneos/SMAP.build/Objects-normal/arm64/SearchView.o /Users/a/Library/Developer/Xcode/DerivedData/SMAP-bshetjpaaresiudzvoubtutnfvuq/Build/Intermediates/SMAP.build/Debug-iphoneos/SMAP.build/Objects-normal/arm64/EventSliderCell.o duplicate symbol _space in: /Users/a/Library/Developer/Xcode/DerivedData/SMAP-bshetjpaaresiudzvoubtutnfvuq/Build/Intermediates/SMAP.build/Debug-iphoneos/SMAP.build/Objects-normal/arm64/SearchView.o /Users/a/Library/Developer/Xcode/DerivedData/SMAP-bshetjpaaresiudzvoubtutnfvuq/Build/Intermediates/SMAP.build/Debug-iphoneos/SMAP.build/Objects-normal/arm64/UserProfile.o duplicate symbol _space in: /Users/a/Library/Developer/Xcode/DerivedData/SMAP-bshetjpaaresiudzvoubtutnfvuq/Build/Intermediates/SMAP.build/Debug-iphoneos/SMAP.build/Objects-normal/arm64/SearchView.o /Users/a/Library/Developer/Xcode/DerivedData/SMAP-bshetjpaaresiudzvoubtutnfvuq/Build/Intermediates/SMAP.build/Debug-iphoneos/SMAP.build/Objects-normal/arm64/EventCell.o duplicate symbol _space in: /Users/a/Library/Developer/Xcode/DerivedData/SMAP-bshetjpaaresiudzvoubtutnfvuq/Build/Intermediates/SMAP.build/Debug-iphoneos/SMAP.build/Objects-normal/arm64/SearchView.o /Users/a/Library/Developer/Xcode/DerivedData/SMAP-bshetjpaaresiudzvoubtutnfvuq/Build/Intermediates/SMAP.build/Debug-iphoneos/SMAP.build/Objects-normal/arm64/NewsFeed.o duplicate symbol _textViewMaxHeight in: /Users/a/Library/Developer/Xcode/DerivedData/SMAP-bshetjpaaresiudzvoubtutnfvuq/Build/Intermediates/SMAP.build/Debug-iphoneos/SMAP.build/Objects-normal/arm64/EventSliderCell.o /Users/a/Library/Developer/Xcode/DerivedData/SMAP-bshetjpaaresiudzvoubtutnfvuq/Build/Intermediates/SMAP.build/Debug-iphoneos/SMAP.build/Objects-normal/arm64/ExpressSliderCell.o duplicate symbol _textViewStandardHeight in: /Users/a/Library/Developer/Xcode/DerivedData/SMAP-bshetjpaaresiudzvoubtutnfvuq/Build/Intermediates/SMAP.build/Debug-iphoneos/SMAP.build/Objects-normal/arm64/EventSliderCell.o /Users/a/Library/Developer/Xcode/DerivedData/SMAP-bshetjpaaresiudzvoubtutnfvuq/Build/Intermediates/SMAP.build/Debug-iphoneos/SMAP.build/Objects-normal/arm64/ExpressSliderCell.o duplicate symbol _textViewStep in: /Users/a/Library/Developer/Xcode/DerivedData/SMAP-bshetjpaaresiudzvoubtutnfvuq/Build/Intermediates/SMAP.build/Debug-iphoneos/SMAP.build/Objects-normal/arm64/EventSliderCell.o /Users/a/Library/Developer/Xcode/DerivedData/SMAP-bshetjpaaresiudzvoubtutnfvuq/Build/Intermediates/SMAP.build/Debug-iphoneos/SMAP.build/Objects-normal/arm64/ExpressSliderCell.o duplicate symbol _space in: /Users/a/Library/Developer/Xcode/DerivedData/SMAP-bshetjpaaresiudzvoubtutnfvuq/Build/Intermediates/SMAP.build/Debug-iphoneos/SMAP.build/Objects-normal/arm64/SearchView.o /Users/a/Library/Developer/Xcode/DerivedData/SMAP-bshetjpaaresiudzvoubtutnfvuq/Build/Intermediates/SMAP.build/Debug-iphoneos/SMAP.build/Objects-normal/arm64/FollowerUserViewController.o duplicate symbol _space in: /Users/a/Library/Developer/Xcode/DerivedData/SMAP-bshetjpaaresiudzvoubtutnfvuq/Build/Intermediates/SMAP.build/Debug-iphoneos/SMAP.build/Objects-normal/arm64/SearchView.o /Users/a/Library/Developer/Xcode/DerivedData/SMAP-bshetjpaaresiudzvoubtutnfvuq/Build/Intermediates/SMAP.build/Debug-iphoneos/SMAP.build/Objects-normal/arm64/FilterAlertView.o duplicate symbol _space in: /Users/a/Library/Developer/Xcode/DerivedData/SMAP-bshetjpaaresiudzvoubtutnfvuq/Build/Intermediates/SMAP.build/Debug-iphoneos/SMAP.build/Objects-normal/arm64/SearchView.o /Users/a/Library/Developer/Xcode/DerivedData/SMAP-bshetjpaaresiudzvoubtutnfvuq/Build/Intermediates/SMAP.build/Debug-iphoneos/SMAP.build/Objects-normal/arm64/UserNotificationsViewController.o ld: 20 duplicate symbols for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
Solution. Duplicate symbols occur when you have both added an implementation file (. cpp) to your project and #included it. This way, the implementation file (. cpp) gets compiled twice: once as a module in your project (as it is added to your project) and subsequently as a piece of #included code.
Why Is the Undefined Symbols for Architecture x86_64: Error Happening? This error is happening due to the lack of included values inside the declared statements in your code. The browser is going to render the information incorrectly and show this error, especially if you are working with Main and Similarity tools.
Below Patch work for me..:)
Code recommended to use warning flags and set GCC_NO_COMMON_BLOCKS to YES.
Setting it back to NO solved the problem!
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