我正在尝试将 Facebook SDK 集成到我的 xcode 项目中,但我遇到了一个绊脚石。
经过一番研究,我尝试确保我拥有最新版本的 FacebookSDK,因为那些与我有相同错误的人能够使用最新版本解决他们的问题,但这并没有帮助,所以我尝试下载源代码从 github 并使用 build_all.sh 命令重新编译,这也没有帮助。
我会把完整的错误日志放在最后,因为它很长,但这是最后的部分:
clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)
我已经看到很多与此问题相关的字符串,但正如我之前所说,既没有更新到最新的 SDK(在我的情况下,这是一个不必要的步骤,因为我已经拥有它)或重新编译 armv7 的源代码,armv7s 解决了这个问题。
提前致谢,
汤姆
完整错误日志:
重复符号 _OBJC_IVAR_$_FBRequest._delegate 在:/Users/tomhenry/Library/Developer/Xcode/DerivedData/Unity-iPhone-bioesylflkyylfdprjpcoipvoxpb/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/ unity-iPhone.build/Objects-normal/armv7/FBRequest.o /Users/tomhenry/Facebook/build/FacebookSDK.framework/FacebookSDK(FBRequest.o) 重复符号_OBJC_IVAR_$_FBRequest._url 在:/Users/tomhenry/Library/ Developer/Xcode/DerivedData/Unity-iPhone-bioesylflkyylfdprjpcoipvoxpb/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/FBRequest.o/用户/tomhenry/Facebook/build/FacebookSDK.framework/FacebookSDK(FBRequest.o) 重复符号_OBJC_IVAR_$_FBRequest。_connection 在:/Users/tomhenry/Library/Developer/Xcode/DerivedData/Unity-iPhone-bioesylflkyylfdprjpcoipvoxpb/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/对象-normal/armv7/FBRequest.o /Users/tomhenry/Facebook/build/FacebookSDK.framework/FacebookSDK(FBRequest.o) 重复符号_OBJC_IVAR_$_FBRequest._responseText 在:/Users/tomhenry/Library/Developer/Xcode/DerivedData/ Unity-iPhone-bioesylflkyyllfdprjpcoipvoxpb/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/FBRequest.o /Users/tomhenry/Facebook/ build/FacebookSDK.framework/FacebookSDK(FBRequest.o) 重复符号 _OBJC_IVAR_$_FBRequest._error 在:/Users/tomhenry/Library/Developer/Xcode/DerivedData/Unity-iPhone-bioesylflkyylfdprjpcoipvoxpb/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal /armv7/FBRequest.o /Users/tomhenry/Facebook/build/FacebookSDK.framework/FacebookSDK(FBRequest.o) 重复符号 _OBJC_IVAR_$_FBRequest._state 在:/Users/tomhenry/Library/Developer/Xcode/DerivedData/Unity-iPhone -bioesylflkyylfdprjpcoipvoxpb/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/FBRequest.o /Users/tomhenry/Facebook/build/FacebookSDK .framework/FacebookSDK(FBRequest.o) 重复符号 _OBJC_IVAR_$_FBRequest._sessionDidExpire 在:/Users/tomhenry/Library/Developer/Xcode/DerivedData/Unity-iPhone-bioesylflkyylfdprjpcoipvoxpb/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal /armv7/FBRequest.o /Users/tomhenry/Facebook/build/FacebookSDK.framework/FacebookSDK(FBRequest.o) 重复符号 _OBJC_CLASS_$_FBRequest 在:/Users/tomhenry/Library/Developer/Xcode/DerivedData/Unity-iPhone-bioesylflkyylfdprjpcoipvoxpb /Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/FBRequest.o /Users/tomhenry/Facebook/build/FacebookSDK.framework /FacebookSDK(FBRequest.o) 复制符号 _OBJC_METACLASS_$_FBRequest 在:/Users/tomhenry/Library/Developer/Xcode/DerivedData/Unity-iPhone-bioesylflkyylfdprjpcoipvoxpb/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal /armv7/FBRequest.o /Users/tomhenry/Facebook/build/FacebookSDK.framework/FacebookSDK(FBRequest.o) 重复符号 _OBJC_IVAR_$_FBLoginDialog._loginDelegate 在:/Users/tomhenry/Library/Developer/Xcode/DerivedData/Unity-iPhone -bioesylflkyylfdprjpcoipvoxpb/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/FBLoginDialog.o /Users/tomhenry/Facebook/build/FacebookSDK .framework/FacebookSDK(FBLoginDialog.o) 重复符号 _OBJC_CLASS_$_FBLoginDialog 在:/Users/tomhenry/Library/Developer/Xcode/DerivedData/Unity-iPhone-bioesylflkyylfdprjpcoipvoxpb/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal /armv7/FBLoginDialog.o /Users/tomhenry/Facebook/build/FacebookSDK.framework/FacebookSDK(FBLoginDialog.o) 重复符号 _OBJC_METACLASS_$_FBLoginDialog 在:/Users/tomhenry/Library/Developer/Xcode/DerivedData/Unity-iPhone-bioesylflkyylfdprjpcoipvoxpb /Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/FBLoginDialog.o /Users/tomhenry/Facebook/build/FacebookSDK.framework /FacebookSDK(FBLoginDialog.o) 复制符号 _OBJC_IVAR_$_FBDialog._orientation 在:/Users/tomhenry/Library/Developer/Xcode/DerivedData/Unity-iPhone-bioesylflkyylfdprjpcoipvoxpb/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal /armv7/FBDialog.o /Users/tomhenry/Facebook/build/FacebookSDK.framework/FacebookSDK(FBDialog.o) 重复符号 _OBJC_IVAR_$_FBDialog._webView 在:/Users/tomhenry/Library/Developer/Xcode/DerivedData/Unity-iPhone -bioesylflkyylfdprjpcoipvoxpb/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/FBDialog.o /Users/tomhenry/Facebook/build/FacebookSDK .framework/FacebookSDK(FBDialog.o) 重复符号 _OBJC_IVAR_$_FBDialog._modalBackgroundView 在:/Users/tomhenry/Library/Developer/Xcode/DerivedData/Unity-iPhone-bioesylflkyylfdprjpcoipvoxpb/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity->iPhone.build/Objects- normal/armv7/FBDialog.o /Users/tomhenry/Facebook/build/FacebookSDK.framework/FacebookSDK(FBDialog.o) 重复符号 _OBJC_IVAR_$_FBDialog._loadingURL 在:/Users/tomhenry/Library/Developer/Xcode/DerivedData/Unity- iPhone-bioesylflkyylfdprjpcoipvoxpb/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/FBDialog.o /Users/tomhenry/Facebook/build/ FacebookSDK.framework/FacebookSDK(FBDialog.o) 重复符号 _OBJC_IVAR_$_FBDialog._frictionlessSettings 在:/Users/tomhenry/Library/Developer/Xcode/DerivedData/Unity-iPhone-bioesylflkyylfdprjpcoipvoxpb/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal /armv7/FBDialog.o /Users/tomhenry/Facebook/build/FacebookSDK.framework/FacebookSDK(FBDialog.o) 重复符号 _OBJC_IVAR_$_FBDialog._delegate 在:/Users/tomhenry/Library/Developer/Xcode/DerivedData/Unity-iPhone -bioesylflkyylfdprjpcoipvoxpb/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/FBDialog.o /Users/tomhenry/Facebook/build/FacebookSDK .framework/FacebookSDK(FBDialog.o) 重复符号 _OBJC_IVAR_$_FBDialog._showingKeyboard 在:/Users/tomhenry/Library/Developer/Xcode/DerivedData/Unity-iPhone-bioesylflkyylfdprjpcoipvoxpb/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal /armv7/FBDialog.o /Users/tomhenry/Facebook/build/FacebookSDK.framework/FacebookSDK(FBDialog.o) 重复符号 _OBJC_IVAR_$_FBDialog._closeButton 在:/Users/tomhenry/Library/Developer/Xcode/DerivedData/Unity-iPhone -bioesylflkyylfdprjpcoipvoxpb/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/FBDialog.o /Users/tomhenry/Facebook/build/FacebookSDK .framework/FacebookSDK(FBDialog.o) 重复符号 _OBJC_IVAR_$_FBDialog._spinner 在:/Users/tomhenry/Library/Developer/Xcode/DerivedData/Unity-iPhone-bioesylflkyylfdprjpcoipvoxpb/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal /armv7/FBDialog.o /Users/tomhenry/Facebook/build/FacebookSDK.framework/FacebookSDK(FBDialog.o) 重复符号 _OBJC_IVAR_$_FBDialog._params 在:/Users/tomhenry/Library/Developer/Xcode/DerivedData/Unity-iPhone -bioesylflkyylfdprjpcoipvoxpb/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/FBDialog.o /Users/tomhenry/Facebook/build/FacebookSDK .framework/FacebookSDK(FBDialog.o) 重复符号 _OBJC_IVAR_$_FBDialog._serverURL 在:/Users/tomhenry/Library/Developer/Xcode/DerivedData/Unity-iPhone-bioesylflkyylfdprjpcoipvoxpb/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal /armv7/FBDialog.o /Users/tomhenry/Facebook/build/FacebookSDK.framework/FacebookSDK(FBDialog.o) 重复符号 _OBJC_IVAR_$_FBDialog._isViewInvisible 在:/Users/tomhenry/Library/Developer/Xcode/DerivedData/Unity-iPhone -bioesylflkyylfdprjpcoipvoxpb/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/FBDialog.o /Users/tomhenry/Facebook/build/FacebookSDK .framework/FacebookSDK(FBDialog.o) 重复符号 _OBJC_CLASS_$_FBDialog 在:/Users/tomhenry/Library/Developer/Xcode/DerivedData/Unity-iPhone-bioesylflkyylfdprjpcoipvoxpb/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal /armv7/FBDialog.o /Users/tomhenry/Facebook/build/FacebookSDK.framework/FacebookSDK(FBDialog.o) 重复符号 _OBJC_METACLASS_$_FBDialog 在:/Users/tomhenry/Library/Developer/Xcode/DerivedData/Unity-iPhone-bioesylflkyylfdprjpcoipvoxpb /Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/FBDialog.o /Users/tomhenry/Facebook/build/FacebookSDK.framework /FacebookSDK(FBDialog.o) 重复符号 _OBJC_IVAR_$_FBFrictionlessRequestSettings._enabled 在:/Users/tomhenry/Library/Developer/Xcode/DerivedData/Unity-iPhone-bioesylflkyylfdprjpcoipvoxpb/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal /armv7/FBFrictionlessRequestSettings.o /Users/tomhenry/Facebook/build/FacebookSDK.framework/FacebookSDK(FBFrictionlessRequestSettings.o) 重复符号 _OBJC_IVAR_$_FBFrictionlessRequestSettings._allowedRecipients 在:/Users/tomhenry/Library/Developer/Xcode/DerivedData/Unity-iPhone -bioesylflkyylfdprjpcoipvoxpb/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/FBFrictionlessRequestSettings.o /Users/tomhenry/Facebook/build/FacebookSDK .框架/FacebookSDK(FBFrictionlessRequestSettings.o) 重复符号 _OBJC_IVAR_$_FBFrictionlessRequestSettings._activeRequest 在:/Users/tomhenry/Library/Developer/Xcode/DerivedData/Unity-iPhone-bioesylflkyylfdprjpcoipvoxpb/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity- iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/FBFrictionlessRequestSettings.o /Users/tomhenry/Facebook/build/FacebookSDK.framework/FacebookSDK(FBFrictionlessRequestSettings.o) 重复符号 _OBJC_CLASS_$_FBFrictionlessRequestSettings 在:/用户/tomhenry/Library/Developer/Xcode/DerivedData/Unity-iPhone-bioesylflkyylfdprjpcoipvoxpb/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone。build/Objects-normal/armv7/FBFrictionlessRequestSettings.o /Users/tomhenry/Facebook/build/FacebookSDK.framework/FacebookSDK(FBFrictionlessRequestSettings.o) 重复符号 _OBJC_METACLASS_$_FBFrictionlessRequestSettings 在:/Users/tomhenry/Library/Developer/Xcode/DerivedData/ Unity-iPhone-bioesylflkyyllfdprjpcoipvoxpb/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/FBFrictionlessRequestSettings.o /Users/tomhenry/Facebook/ build/FacebookSDK.framework/FacebookSDK(FBFrictionlessRequestSettings.o) 重复符号 _OBJC_IVAR_$_Facebook._requests 在:/Users/tomhenry/Library/Developer/Xcode/DerivedData/Unity-iPhone-bioesylflkyylfdprjpcoipvoxpb/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal /armv7/Facebook.o /Users/tomhenry/Facebook/build/FacebookSDK.framework/FacebookSDK(Facebook.o) 重复符号 _OBJC_IVAR_$_Facebook._lastAccessTokenUpdate 在:/Users/tomhenry/Library/Developer/Xcode/DerivedData/Unity-iPhone -bioesylflkyylfdprjpcoipvoxpb/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/Facebook.o/Users/tomhenry/Facebook/build/FacebookSDK .framework/FacebookSDK(Facebook.o) 重复符号 _OBJC_IVAR__$_Facebook._frictionlessRequestSettings 在:/Users/tomhenry/Library/Developer/Xcode/DerivedData/Unity-iPhone-bioesylflkyylfdprjpcoipvoxpb/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal /armv7/Facebook.o /Users/tomhenry/Facebook/build/FacebookSDK.framework/FacebookSDK(Facebook.o) 重复符号 _OBJC_IVAR_$_Facebook._fbDialog 在:/Users/tomhenry/Library/Developer/Xcode/DerivedData/Unity-iPhone -bioesylflkyylfdprjpcoipvoxpb/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/Facebook.o/Users/tomhenry/Facebook/build/FacebookSDK .framework/FacebookSDK(Facebook.o) 重复符号 _OBJC_IVAR__$_Facebook._appId 在:/Users/tomhenry/Library/Developer/Xcode/DerivedData/Unity-iPhone-bioesylflkyylfdprjpcoipvoxpb/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal /armv7/Facebook.o /Users/tomhenry/Facebook/build/FacebookSDK.framework/FacebookSDK(Facebook.o) 重复符号 _OBJC_IVAR_$_Facebook._urlSchemeSuffix 在:/Users/tomhenry/Library/Developer/Xcode/DerivedData/Unity-iPhone -bioesylflkyylfdprjpcoipvoxpb/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/Facebook.o/Users/tomhenry/Facebook/build/FacebookSDK .framework/FacebookSDK(Facebook.o) 重复符号 _OBJC_IVAR__$_Facebook._isExtendingAccessToken 在:/Users/tomhenry/Library/Developer/Xcode/DerivedData/Unity-iPhone-bioesylflkyylfdprjpcoipvoxpb/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal /armv7/Facebook.o /Users/tomhenry/Facebook/build/FacebookSDK.framework/FacebookSDK(Facebook.o) 重复符号 _OBJC_IVAR_$_Facebook._sessionDelegate 在:/Users/tomhenry/Library/Developer/Xcode/DerivedData/Unity-iPhone -bioesylflkyylfdprjpcoipvoxpb/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/Facebook.o/Users/tomhenry/Facebook/build/FacebookSDK .framework/FacebookSDK(Facebook.o) 重复符号 _OBJC_CLASS_$_Facebook 在:/Users/tomhenry/Library/Developer/Xcode/DerivedData/Unity-iPhone-bioesylflkyylfdprjpcoipvoxpb/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal /armv7/Facebook.o /Users/tomhenry/Facebook/build/FacebookSDK.framework/FacebookSDK(Facebook.o) 重复符号 _OBJC_METACLASS_$_Facebook 在:/Users/tomhenry/Library/Developer/Xcode/DerivedData/Unity-iPhone-bioesylflkyylfdprjpcoipvoxpb /Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/Facebook.o /Users/tomhenry/Facebook/build/FacebookSDK.framework /FacebookSDK(Facebook.o) ld:架构 armv7 clang 的 41 个重复符号:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)