0
votes

I'm having a little trouble with an app I'm making. I researched this a bit and looked at other posts, but the fixes that they proposed don't work for me. I am running all the latest softwares.

It says:

3 duplicate symbols for architecture i386 Linker command failed with exit code 1 ( use -v to see invocation)

Ld /Users/RileyLloyd/Library/Developer/Xcode/DerivedData/People_Bingo-eqtneohyjbwwpxclkkhkbtkcddye/Build/Products/Debug-iphonesimulator/People\ Bingo.app/People\ Bingo normal i386 cd "/Users/RileyLloyd/Documents/Xcode/People Bingo" setenv IPHONEOS_DEPLOYMENT_TARGET 7.0 setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk -L/Users/RileyLloyd/Library/Developer/Xcode/DerivedData/People_Bingo-eqtneohyjbwwpxclkkhkbtkcddye/Build/Products/Debug-iphonesimulator -F/Users/RileyLloyd/Library/Developer/Xcode/DerivedData/People_Bingo-eqtneohyjbwwpxclkkhkbtkcddye/Build/Products/Debug-iphonesimulator -filelist /Users/RileyLloyd/Library/Developer/Xcode/DerivedData/People_Bingo-eqtneohyjbwwpxclkkhkbtkcddye/Build/Intermediates/People\ Bingo.build/Debug-iphonesimulator/People\ Bingo.build/Objects-normal/i386/People\ Bingo.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=7.0 -framework CoreData -framework CoreGraphics -framework UIKit -framework Foundation -Xlinker -dependency_info -Xlinker /Users/RileyLloyd/Library/Developer/Xcode/DerivedData/People_Bingo-eqtneohyjbwwpxclkkhkbtkcddye/Build/Intermediates/People\ Bingo.build/Debug-iphonesimulator/People\ Bingo.build/Objects-normal/i386/People\ Bingo_dependency_info.dat -o /Users/RileyLloyd/Library/Developer/Xcode/DerivedData/People_Bingo-eqtneohyjbwwpxclkkhkbtkcddye/Build/Products/Debug-iphonesimulator/People\ Bingo.app/People\ Bingo

duplicate symbol _OBJC_IVAR_$_CollectionViewController._cellArray in: /Users/RileyLloyd/Library/Developer/Xcode/DerivedData/People_Bingo-eqtneohyjbwwpxclkkhkbtkcddye/Build/Intermediates/People Bingo.build/Debug-iphonesimulator/People Bingo.build/Objects-normal/i386/ViewController.o /Users/RileyLloyd/Library/Developer/Xcode/DerivedData/People_Bingo-eqtneohyjbwwpxclkkhkbtkcddye/Build/Intermediates/People Bingo.build/Debug-iphonesimulator/People Bingo.build/Objects-normal/i386/CollectionViewController.o duplicate symbol _OBJC_CLASS_$_CollectionViewController in: /Users/RileyLloyd/Library/Developer/Xcode/DerivedData/People_Bingo-eqtneohyjbwwpxclkkhkbtkcddye/Build/Intermediates/People Bingo.build/Debug-iphonesimulator/People Bingo.build/Objects-normal/i386/ViewController.o /Users/RileyLloyd/Library/Developer/Xcode/DerivedData/People_Bingo-eqtneohyjbwwpxclkkhkbtkcddye/Build/Intermediates/People Bingo.build/Debug-iphonesimulator/People Bingo.build/Objects-normal/i386/CollectionViewController.o duplicate symbol _OBJC_METACLASS_$_CollectionViewController in: /Users/RileyLloyd/Library/Developer/Xcode/DerivedData/People_Bingo-eqtneohyjbwwpxclkkhkbtkcddye/Build/Intermediates/People Bingo.build/Debug-iphonesimulator/People Bingo.build/Objects-normal/i386/ViewController.o /Users/RileyLloyd/Library/Developer/Xcode/DerivedData/People_Bingo-eqtneohyjbwwpxclkkhkbtkcddye/Build/Intermediates/People Bingo.build/Debug-iphonesimulator/People Bingo.build/Objects-normal/i386/CollectionViewController.o ld: 3 duplicate symbols for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)

enter image description here

1

1 Answers

1
votes

Two modules in your application (ViewController and CollectionViewController) have provided an implementation of class CollectionViewController. The three duplication symbols are class metadata.

There are a number of ways you might have done this:

  • You have two modules declaring the same class. Perhaps one is vestigial?
  • The @implementation CollectionViewController appears in a .h file that is included in both CollectionViewController.m and ViewController.m - or you included a .m file somewhere.