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)
答案 0 :(得分:1)
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.
答案 1 :(得分:0)
在implementation
文件中定义.h
时可能会发生这种情况。
尤其是在这种情况下,请查看GTMOAuth2Keychain
的定义位置以及是否在GTMOAuth2ViewControllerTouch.h
中。
通过将实现移至.mm/.m
文件来解决此问题。