Reputation: 51
duplicate symbol _OBJC_METACLASS_$_GTMOAuth2Keychain in: /Users/anand/Library/Developer/Xcode/DerivedData/NIDA_Rooms-bawdeawpyzqrkjazbcspzbsqgrht/Build/Products/Release-iphoneos/GTMOAuth2/libGTMOAuth2.a(GTMOAuth2ViewControllerTouch.o) /Users/anand/Documents/Anand_ios_Project/ROC&NIDAROOMS/ROCAPP 3/GoogleOpenSource.framework/GoogleOpenSource(GTMOAuth2ViewControllerTouch.o) ld: 112 duplicate symbols for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
Upvotes: 2
Views: 2883
Reputation: 2161
This might happen when an implementation
is defined in the .h
file.
Particularly in this case have a look at where does GTMOAuth2Keychain
is define, and if it's in GTMOAuth2ViewControllerTouch.h
.
Fix it by moving the implementation to the .mm/.m
file.
Upvotes: 0
Reputation: 17712
You link against GoogleOpenSource.framework
and libGTMOAuth2.a
. Both contain (define) the symbol _OBJC_METACLASS_$_GTMOAuth2Keychain
. You should remove either the framework or the lib from linking.
Upvotes: 1