【问题标题】:Undefined symbols for architecture x86_64 Swift Xcode架构 x86_64 Swift Xcode 的未定义符号
【发布时间】:2021-03-12 12:23:29
【问题描述】:

我的编译器的错误代码

Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_GTMOAuth2KeychainCompatibility", referenced from:
  objc-class-ref in GoogleSignIn(GIDAuthStateMigration_bdf842e92d17b12b5f020e0e721bd017.o)
"_OBJC_CLASS_$_OIDServiceConfiguration", referenced from:
  objc-class-ref in GoogleSignIn(GIDSignIn_f05654be6d1b2af59ab6df426a0c4eb9.o)
"_OIDResponseTypeCode", referenced from:
  -[GIDSignIn authenticateInteractivelyWithOptions:] in GoogleSignIn(GIDSignIn_f05654be6d1b2af59ab6df426a0c4eb9.o)
"_OBJC_CLASS_$_OIDAuthorizationService", referenced from:
  objc-class-ref in GoogleSignIn(GIDAuthentication_7b83cc27af8929ec7e4c9760d73a0f31.o)
"_OBJC_CLASS_$_OIDURLQueryComponent", referenced from:
  objc-class-ref in GoogleSignIn(GIDSignIn_f05654be6d1b2af59ab6df426a0c4eb9.o)
"_OBJC_CLASS_$_OIDAuthorizationRequest", referenced from:
  objc-class-ref in GoogleSignIn(GIDSignIn_f05654be6d1b2af59ab6df426a0c4eb9.o)
"_OBJC_CLASS_$_GTMAppAuthFetcherAuthorization", referenced from:
  _OBJC_CLASS_$_GTMAppAuthFetcherAuthorizationWithEMMSupport in GoogleSignIn(GIDAuthentication_7b83cc27af8929ec7e4c9760d73a0f31.o)
  objc-class-ref in GoogleSignIn(GIDAuthentication_7b83cc27af8929ec7e4c9760d73a0f31.o)
 (maybe you meant: _OBJC_CLASS_$_GTMAppAuthFetcherAuthorizationEMMChainedDelegate, _OBJC_CLASS_$_GTMAppAuthFetcherAuthorizationWithEMMSupport )
"_OIDOAuthTokenErrorDomain", referenced from:
  ___46-[GIDAuthentication refreshTokensWithHandler:]_block_invoke in GoogleSignIn(GIDAuthentication_7b83cc27af8929ec7e4c9760d73a0f31.o)
"_OBJC_CLASS_$_OIDIDToken", referenced from:
  objc-class-ref in GoogleSignIn(GIDGoogleUser_2bdd4a676c033bc6ca21970e75d9159c.o)
"_OBJC_METACLASS_$_GTMAppAuthFetcherAuthorization", referenced from:
  _OBJC_METACLASS_$_GTMAppAuthFetcherAuthorizationWithEMMSupport in GoogleSignIn(GIDAuthentication_7b83cc27af8929ec7e4c9760d73a0f31.o)
 (maybe you meant: _OBJC_METACLASS_$_GTMAppAuthFetcherAuthorizationWithEMMSupport, _OBJC_METACLASS_$_GTMAppAuthFetcherAuthorizationEMMChainedDelegate )
"_OIDOAuthErrorResponseErrorKey", referenced from:
  +[GIDAuthentication handleTokenFetchEMMError:completion:] in GoogleSignIn(GIDAuthentication_7b83cc27af8929ec7e4c9760d73a0f31.o)
"_OBJC_CLASS_$_GTMKeychain", referenced from:
  objc-class-ref in GoogleSignIn(GIDAuthStateMigration_bdf842e92d17b12b5f020e0e721bd017.o)
"_OBJC_CLASS_$_OIDAuthState", referenced from:
  objc-class-ref in GoogleSignIn(GIDAuthentication_7b83cc27af8929ec7e4c9760d73a0f31.o)

ld:未找到架构 x86_64 的符号 clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)

我已经尝试了一切以使其再次工作,并且我从面临类似问题的其他帖子中读取的堆栈溢出的所有内容

-重新安装 pod -更新吊舱 -新的podifile - 移除目标 - 删除派生数据 -清洁项目 - 重启模拟器 -重启Xcode

我什至不知道我做了什么改变才能出现这个问题,以前从来没有遇到过这个问题

感谢任何帮助!

【问题讨论】:

    标签: swift xcode architecture x86-64 undefined-symbol


    【解决方案1】:

    没有示例项目,我们只能猜测您做错了什么。

    所以我猜... 如果您更新到 Xcode 12 - 转到项目设置,滚动到底部的 User-Defined 部分并删除 VALID_ARCHS 设置。如果你没有它 - 那么我的猜测是错误的,我祝你好运:D。

    统一更新: 我找到了same answer

    【讨论】:

    • 我在我的项目中找不到 VALID_ARCHS
    【解决方案2】:

    这个错误是我不小心删除了我不知道的 pod 文件中的代码造成的。

    删除 pod 并将其移回没有帮助

    停止帮助是

    pod deintegrate
    pod install
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-11-07
      • 2015-11-24
      • 2013-03-09
      • 2013-02-07
      • 2016-11-05
      相关资源
      最近更新 更多