gpt4 book ai didi

xcode - 如何获得Xcode “clang”编译时错误的调用?

转载 作者:行者123 更新时间:2023-12-02 10:41:11 24 4
gpt4 key购买 nike

我在Xcode中收到包含此消息的编译时错误

clang: error: linker command failed with exit code 1 (use -v to see invocation)



-v显然是一个命令行选项。我以前曾碰到过此消息,但对于我可以做的事情以及为什么我对此无能为力,为什么将其包含在内,一直感到困惑。

如何使用Xcode中的选项查看调用?

最佳答案

您可以将-v添加到项目设置中的“其他链接器标志”字段中。在此处的测试项目中进行此操作将产生完整的链接程序调用:

 "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld"
-demangle
-dynamic
-arch x86_64
-macosx_version_min 10.8.0
-syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk
-o /Users/carl/Library/Developer/Xcode/DerivedData/example-ewesimyvcwmjptdwzbkqoasrcppe/Build/Products/Debug/example
-L/Users/carl/Library/Developer/Xcode/DerivedData/example-ewesimyvcwmjptdwzbkqoasrcppe/Build/Products/Debug
-filelist /Users/carl/Library/Developer/Xcode/DerivedData/example-ewesimyvcwmjptdwzbkqoasrcppe/Build/Intermediates/example.build/Debug/example.build/Objects-normal/x86_64/example.LinkFileList
-dependency_info /Users/carl/Library/Developer/Xcode/DerivedData/example-ewesimyvcwmjptdwzbkqoasrcppe/Build/Intermediates/example.build/Debug/example.build/Objects-normal/x86_64/example_dependency_info.dat
-lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/5.0/lib/darwin/libclang_rt.osx.a
-F/Users/carl/Library/Developer/Xcode/DerivedData/example-ewesimyvcwmjptdwzbkqoasrcppe/Build/Products/Debug

关于xcode - 如何获得Xcode “clang”编译时错误的调用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19031963/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com