Question

Hope you guys know how to fix this one. I probably just need to add a framework to the link binary but I can't really find which one to add.

Ld /Users/Chrismac/Library/Developer/Xcode/DerivedData/Sum-cyzxwtuyfesisgfvermcafpbmtgv/Build/Products/Debug-iphonesimulator/Sum.app/Sum normal i386 cd /Users/Chrismac/Documents/Sum export IPHONEOS_DEPLOYMENT_TARGET=7.1 export 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.1.sdk -L/Users/Chrismac/Library/Developer/Xcode/DerivedData/Sum-cyzxwtuyfesisgfvermcafpbmtgv/Build/Products/Debug-iphonesimulator -F/Users/Chrismac/Library/Developer/Xcode/DerivedData/Sum-cyzxwtuyfesisgfvermcafpbmtgv/Build/Products/Debug-iphonesimulator -filelist /Users/Chrismac/Library/Developer/Xcode/DerivedData/Sum-cyzxwtuyfesisgfvermcafpbmtgv/Build/Intermediates/Sum.build/Debug-iphonesimulator/Sum.build/Objects-normal/i386/Sum.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=7.1 -framework CoreGraphics -framework UIKit -framework Foundation -Xlinker -dependency_info -Xlinker /Users/Chrismac/Library/Developer/Xcode/DerivedData/Sum-cyzxwtuyfesisgfvermcafpbmtgv/Build/Intermediates/Sum.build/Debug-iphonesimulator/Sum.build/Objects-normal/i386/Sum_dependency_info.dat -o /Users/Chrismac/Library/Developer/Xcode/DerivedData/Sum-cyzxwtuyfesisgfvermcafpbmtgv/Build/Products/Debug-iphonesimulator/Sum.app/Sum

duplicate symbol _PressIt in: /Users/Chrismac/Library/Developer/Xcode/DerivedData/Sum-cyzxwtuyfesisgfvermcafpbmtgv/Build/Intermediates/Sum.build/Debug-iphonesimulator/Sum.build/Objects-normal/i386/SecondViewController.o /Users/Chrismac/Library/Developer/Xcode/DerivedData/Sum-cyzxwtuyfesisgfvermcafpbmtgv/Build/Intermediates/Sum.build/Debug-iphonesimulator/Sum.build/Objects-normal/i386/FirstViewController.o duplicate symbol _push in: /Users/Chrismac/Library/Developer/Xcode/DerivedData/Sum-cyzxwtuyfesisgfvermcafpbmtgv/Build/Intermediates/Sum.build/Debug-iphonesimulator/Sum.build/Objects-normal/i386/SecondViewController.o /Users/Chrismac/Library/Developer/Xcode/DerivedData/Sum-cyzxwtuyfesisgfvermcafpbmtgv/Build/Intermediates/Sum.build/Debug-iphonesimulator/Sum.build/Objects-normal/i386/FirstViewController.o duplicate symbol _savedData in: /Users/Chrismac/Library/Developer/Xcode/DerivedData/Sum-cyzxwtuyfesisgfvermcafpbmtgv/Build/Intermediates/Sum.build/Debug-iphonesimulator/Sum.build/Objects-normal/i386/SecondViewController.o /Users/Chrismac/Library/Developer/Xcode/DerivedData/Sum-cyzxwtuyfesisgfvermcafpbmtgv/Build/Intermediates/Sum.build/Debug-iphonesimulator/Sum.build/Objects-normal/i386/FirstViewController.o ld: 3 duplicate symbols for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Was it helpful?

Solution

You aren't missing a lib but you have 2 C functions called Pressit, Push and SavedData that conflict!

The duplicated symbols are in FirstViewController & SecondViewController.

Solution:

Don't implement the same functions twice:

  • If they are equal, move them to a third file and include them only.
  • If they differ, rename them.

OTHER TIPS

I guess, you might have implemented FirstViewController three times in your project.

Search for FirstViewController throughout out the project and keep only one FirstViewController for project.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top