问题
Any suggestions please:
duplicate symbol _OBJC_CLASS_$_Reachability in:
/Users/retributionxd/Library/Developer/Xcode/DerivedData/RevEye-doarrfgrbaqxejbxnrhmfdcgqgka/Build/Intermediates/RevEye.build/Debug-iphonesimulator/RevEye.build/Objects-normal/x86_64/Reachability.o
/Users/retributionxd/Desktop/amar/reveye/RevEye/WikitudeSDK.framework/WikitudeSDK(Reachability.o)
duplicate symbol _OBJC_METACLASS_$_Reachability in:
/Users/retributionxd/Library/Developer/Xcode/DerivedData/RevEye-doarrfgrbaqxejbxnrhmfdcgqgka/Build/Intermediates/RevEye.build/Debug-iphonesimulator/RevEye.build/Objects-normal/x86_64/Reachability.o
/Users/retributionxd/Desktop/amar/reveye/RevEye/WikitudeSDK.framework/WikitudeSDK(Reachability.o)
ld: 2 duplicate symbols for architecture x86_64
Error statement:
clang: error: linker command failed with exit code 1 (use -v to see invocation)
回答1:
Updated Possible solutions
- Delete your
DerivedDatafolder and build again (you should do that from time to time anyway) - start XCode again, clean, build - remove
WikitudeSDK.frameworktry to build. I can image that you embedded that framework twice, make sure this is not the case by removing one. If it doesnt work, add it again and try to build
回答2:
This error occur due to duplicate of files. Sometimes we use multiple frameworks but those framework have files which other framework have too. So, we need to identify the duplicate file and remove them.
来源:https://stackoverflow.com/questions/33499570/xcode-duplicate-symbol