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)
Asked
Active
Viewed 2,821 times
2
-
2Just remove framewrok from your project and clean it and add it again . your duplicate problem solve. – Himanshu Moradiya Nov 18 '16 at 06:16
-
Update your question with a few more of the duplicate symbols. – rmaddy Nov 18 '16 at 06:38
2 Answers
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.

clemens
- 16,716
- 11
- 50
- 65
-
-
Try to remove the library from the target settings of your project. The duplicate symbols errors should disappear, but missing symbols could appear. If that happen, add the library again and remove the framework. You cannot build your app with both, library and framework. – clemens Nov 18 '16 at 06:55
-
-
Look into the **target settings** of your app. There's a tab _General_ where you can find a section `Linked Frameworks and Libraries`. Select the framework and click the minus symbol below. – clemens Nov 18 '16 at 07:10
0
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.

danielhadar
- 2,031
- 1
- 16
- 27