Question: I keep getting this error while compliing from my xcode. IT said linked command failed with exit code 1. Can anyone help me out? /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++

I keep getting this error while compliing from my xcode.

IT said linked command failed with exit code 1.

Can anyone help me out?

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -L/Users/patkhai/Library/Developer/Xcode/DerivedData/Linkedlist-bjdllawsxtdbhdbnnoqcmemnqafx/Build/Products/Debug -F/Users/patkhai/Library/Developer/Xcode/DerivedData/Linkedlist-bjdllawsxtdbhdbnnoqcmemnqafx/Build/Products/Debug -filelist /Users/patkhai/Library/Developer/Xcode/DerivedData/Linkedlist-bjdllawsxtdbhdbnnoqcmemnqafx/Build/Intermediates/Linkedlist.build/Debug/Linkedlist.build/Objects-normal/x86_64/Linkedlist.LinkFileList -mmacosx-version-min=10.12 -Xlinker -object_path_lto -Xlinker /Users/patkhai/Library/Developer/Xcode/DerivedData/Linkedlist-bjdllawsxtdbhdbnnoqcmemnqafx/Build/Intermediates/Linkedlist.build/Debug/Linkedlist.build/Objects-normal/x86_64/Linkedlist_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -stdlib=libc++ -Xlinker -dependency_info -Xlinker /Users/patkhai/Library/Developer/Xcode/DerivedData/Linkedlist-bjdllawsxtdbhdbnnoqcmemnqafx/Build/Intermediates/Linkedlist.build/Debug/Linkedlist.build/Objects-normal/x86_64/Linkedlist_dependency_info.dat -o /Users/patkhai/Library/Developer/Xcode/DerivedData/Linkedlist-bjdllawsxtdbhdbnnoqcmemnqafx/Build/Products/Debug/Linkedlist

duplicate symbol _temp in:

/Users/patkhai/Library/Developer/Xcode/DerivedData/Linkedlist-bjdllawsxtdbhdbnnoqcmemnqafx/Build/Intermediates/Linkedlist.build/Debug/Linkedlist.build/Objects-normal/x86_64/main.o

/Users/patkhai/Library/Developer/Xcode/DerivedData/Linkedlist-bjdllawsxtdbhdbnnoqcmemnqafx/Build/Intermediates/Linkedlist.build/Debug/Linkedlist.build/Objects-normal/x86_64/singlelist.o

duplicate symbol _head in:

/Users/patkhai/Library/Developer/Xcode/DerivedData/Linkedlist-bjdllawsxtdbhdbnnoqcmemnqafx/Build/Intermediates/Linkedlist.build/Debug/Linkedlist.build/Objects-normal/x86_64/main.o

/Users/patkhai/Library/Developer/Xcode/DerivedData/Linkedlist-bjdllawsxtdbhdbnnoqcmemnqafx/Build/Intermediates/Linkedlist.build/Debug/Linkedlist.build/Objects-normal/x86_64/singlelist.o

ld: 2 duplicate symbols for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!