我将XCode从9.2升级到9.4.1,现在出现此错误:
ld:声明失败:(target-> definition()!= ld :: Atom :: definitionProxy),函数addDyldInfo,文件 /Library/Caches/com.apple.xbs/Sources/ld64/ld64-351.8/src/ld/OutputFile.cpp, 行4213。
编辑:这是详细的错误消息。
Ld /用户/ Regis /库/开发人员/Xcode/DerivedData/UmtPlus-gotzoynnllcwircryjfseogfutkh/Build/Products/Debug-iphoneos/UmtPlus.app/UmtPlus normal arm64 cd“ /用户/ Regis / Dropbox / Laubrass / Mac / UmtPlus V19 / devRS_UmtPlus” 出口IPHONEOS_DEPLOYMENT_TARGET = 8.2 导出PATH =“ / Applications / Xcode.app / Contents / Developer / Platforms / iPhoneOS.platform / Developer / usr / bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/ usr / local / bin:/ usr / bin:/ bin:/ usr / sbin:/ sbin“ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11。 4.sdk -L / Users / Regis / Library / Developer / Xcode / DerivedData / UmtPlus-gotzoynnllcwircryjfseogfutkh / Build / Products / Debug-iphoneos -F / Users / Regis / Library / Developer / Xcode / DerivedData / UmtPlus-gotzoynynllcfurct产品/ Debug-iphoneos-文件列表/用户/ Regis /库/Developer/Xcode/DerivedData/UmtPlus-gotzoynnllcwircryjfseogfutkh/Build/Intermediates.noindex/UmtPlus.build/Debug-iphoneos/UmtPlus.build/Objects-normal/arm64/UmtPlus。 LinkFileList -Xlinker -rpath -Xlinker @ executable_path / Framework -miphoneos-version-min = 8.2 -dead_strip -Xlinker -object_path_lto -Xlinker / Users / Regis / Library / Developer / Xcode / DerivedData / UmtPlus-gotzoynnllcwircryjfseogfutest。 UmtPlus.build/Debug-iphoneos/UmtPlus.build/Objects-normal/arm64/UmtPlus_lto.o -Xlinker -export_d ynamic -Xlinker -no_deduplicate -fembed-bitcode-marker -fobjc-arc -fobjc-link-runtime -L / Applications / Xcode.app / Contents / Developer / Toolchains / XcodeDefault.xctoolchain / usr / lib / swift / iphoneos -Xlinker- add_ast_path -Xlinker /用户/Regis/Library/Developer/Xcode/DerivedData/UmtPlus-gotzoynnllcwircryjfseogfutkh/Build/Intermediates.noindex/UmtPlus.build/Debug-iphoneos/UmtPlus.build/Objects-normal/arm64/UmtPlus.swiftmodule -l lsqlite3-弱框架-Xlinker -dependency_info -Xlinker /Users/Regis/Library/Developer/Xcode/DerivedData/UmtPlus-gotzoynnllcwircryjfseogfutkh/Build/Intermediates.noindex/UmtPlus.build/Debug-iphoneos/UmtPlus.build/Objects /UmtPlus_dependency_info.dat -o /Users/Regis/Library/Developer/Xcode/DerivedData/UmtPlus-gotzoynnllcwircryjfseogfutkh/Build/Products/Debug-iphoneos/UmtPlus.app/UmtPlus
0 0x106e252c0 __assert_rtn + 129 1 0x106e9b82e ld :: tool :: OutputFile :: addDyldInfo(ld :: Internal&,ld :: Internal :: FinalSection,ld :: Atom const,ld :: Fixup,ld :: Fixup,ld :: Fixup,ld :: Atom const,ld :: Atom const *,unsigned long long,unsigned long long)+ 3244 2 0x106e901e9 ld :: tool :: OutputFile :: generateLinkEditInfo(ld :: Internal&)+ 1215 3 0x106e8ab3a ld :: tool :: OutputFile :: write(ld :: Internal&)+ 116 4 0x106e26254主+ 1146 在以下位置创建了链接器快照: /tmp/UmtPlus-2018-07-15-074029.ld-快照 ld:声明失败:(target-> definition()!= ld :: Atom :: definitionProxy),函数addDyldInfo,文件/Library/Caches/com.apple.xbs/Sources/ld64/ld64-351.8/src/ld/ OutputFile.cpp,第4213行。 clang:错误:链接器命令失败,退出代码为1(使用-v查看调用)
答案 0 :(得分:0)
这可能是由于命令行工具引起的。尝试使用Xcode->首选项->位置,并将命令行工具设置为Xcode 9.3。