Question

This problem is driving me nuts. I can't seem to figure it out. It happened out of nowhere. I looked at the various related messages but couldn't find a solution that worked for me.

Ld "/Users/mmemmo/Library/Developer/Xcode/DerivedData/Simple_Science_Tab-gifjwcnwxnqxuhacsbdlutruxepk/Build/Products/Debug-iphoneos/Simple Science Tab.app/Simple Science Tab" normal armv7
cd "/Users/mmemmo/Dropbox/Apple/Simple Science Tab"
setenv IPHONEOS_DEPLOYMENT_TARGET 6.0
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.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 armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -L/Users/mmemmo/Library/Developer/Xcode/DerivedData/Simple_Science_Tab-gifjwcnwxnqxuhacsbdlutruxepk/Build/Products/Debug-iphoneos -F/Users/mmemmo/Library/Developer/Xcode/DerivedData/Simple_Science_Tab-gifjwcnwxnqxuhacsbdlutruxepk/Build/Products/Debug-iphoneos -filelist "/Users/mmemmo/Library/Developer/Xcode/DerivedData/Simple_Science_Tab-gifjwcnwxnqxuhacsbdlutruxepk/Build/Intermediates/Simple Science Tab.build/Debug-iphoneos/Simple Science Tab.build/Objects-normal/armv7/Simple Science Tab.LinkFileList" -dead_strip -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=6.0 -lsqlite3 -framework QuartzCore -framework UIKit -framework Foundation -framework CoreGraphics -o "/Users/mmemmo/Library/Developer/Xcode/DerivedData/Simple_Science_Tab-gifjwcnwxnqxuhacsbdlutruxepk/Build/Products/Debug-iphoneos/Simple Science Tab.app/Simple Science Tab"

duplicate symbol _dbfn in:
/Users/mmemmo/Library/Developer/Xcode/DerivedData/Simple_Science_Tab-gifjwcnwxnqxuhacsbdlutruxepk/Build/Intermediates/Simple Science Tab.build/Debug-iphoneos/Simple Science Tab.build/Objects-normal/armv7/ssDataBrains.o
/Users/mmemmo/Library/Developer/Xcode/DerivedData/Simple_Science_Tab-gifjwcnwxnqxuhacsbdlutruxepk/Build/Intermediates/Simple Science Tab.build/Debug-iphoneos/Simple Science Tab.build/Objects-normal/armv7/ssCheckInViewController.o

ld: 1 duplicate symbol for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Was it helpful?

Solution

[Not sure of your level...]

The problem is that two .o files both define an external symbol _dbfn. If the .o files are derived from a .c (or .m or others) then somewhere in those files you will see a variable/symbol named dbfn. You could grep for it or within Xcode search for it or again in Xcode use the symbol navigator to find defined symbols.

There might be a chance that the symbol dbfn is defined in a file included by both of those two .o files. Use cc -E <source.c> to see the expanded source and grep for dbfn.

You could do 'nm .o' to learn more about the dbfn symbol and its type.

Note: using nm and cc will require that you've installed the Xcode command-line-tools.

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