【问题标题】:Xcode 11: clang: error: linker command failed with exit code 1 (use -v to see invocation)Xcode 11:clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)
【发布时间】:2020-06-16 13:12:01
【问题描述】:

我已经搜索了很多次,但在从我的 react native 应用程序构建 ios 应用程序时没有找到任何适用于 xcode 11 的解决方案。

请提出任何解决方案。

ld: warning: directory not found for option '-L-L/Users/tanzeel/Library/Developer/Xcode/DerivedData/autodeals-famghlzaemprcbvrzxrehaeaqyk/Build/Products/Debug-iphoneos/AppAuth`
ld: library not found for -lAppAuth
clang: error: linker command failed with exit code -1 (use -v to see invocation)

【问题讨论】:

    标签: xcode react-native xcode11.2


    【解决方案1】:

    我看到了这个确切的错误,并注意到“-L-L/Users/...”看起来很奇怪,因为它应该只有一个 -L。

    我还不知道来源,但是当我查看完整的编译命令(它以/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -Xlinker -rpath -Xlinker /usr/lib/swift -target x86_64-apple-ios9.0-simulator -isysroot ..... 开头)时,我注意到命令中有一个空的'-L',所以它说-L -L/Users/trflagg/Library/Developer/Xcode/DerivedData/...

    从命令中删除它并在命令行中运行该命令让我克服了这个错误。

    更新:从库搜索路径中删除 $(inherited) 似乎有效。但是,我不知道这意味着什么。

    更新 2:更好的是,您可以将 $(inherited) 移动到搜索路径列表的底部。在自己弄清楚后,我找到了这个答案:https://github.com/react-native-community/upgrade-support/issues/36#issuecomment-611516268

    【讨论】:

      猜你喜欢
      • 2016-04-15
      • 2019-10-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-02-12
      • 1970-01-01
      相关资源
      最近更新 更多