Xcode 11:clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用) [英] Xcode 11: clang: error: linker command failed with exit code 1 (use -v to see invocation)
问题描述
我已经搜索了很多次,但在从我的本机应用程序构建 ios 应用程序时没有找到任何适用于 xcode 11 的解决方案.
I have searched many times but didn't find any solution for xcode 11 while building ios app from my react native app.
请提出任何解决方案.
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)
推荐答案
我看到了这个确切的错误,并注意到-LL/Users/..."看起来很奇怪,因为它应该只有一个 -L.
I am seeing this exact error and noticed that the '-L-L/Users/...' looked odd because it should only be one -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/...
I don't know the source yet, but when I looked at the complete compile command (it begins with /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 .....
) I noticed that there was an empty '-L' in the command so that it said -L -L/Users/trflagg/Library/Developer/Xcode/DerivedData/...
从命令中删除它并在命令行中运行该命令让我克服了这个错误.
Removing this from the command and running that command in the command line got me past this error.
更新:从库搜索路径中删除 $(inherited)
似乎有效.但是,我不知道这意味着什么.
UPDATE: Removing $(inherited)
from the Library Search Paths seems to have worked. However, I don't know the implications of this.
更新 2:更好的是,您可以将 $(inherited)
移动到搜索路径列表的底部.在自己弄清楚之后,我找到了这个答案:https://github.com/react-native-community/upgrade-support/issues/36#issuecomment-611516268
UPDATE 2: Even better, you can just move $(inherited)
to the bottom of your list of search paths. After figuring this out myself, I then found this answer: https://github.com/react-native-community/upgrade-support/issues/36#issuecomment-611516268
这篇关于Xcode 11:clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!