0

Apple LLVM 6.0 Error: clang failed with exit code -1中提供的解决方案可能可以解决这个问题,但正如我在问题陈述末尾所说的那样,我不想删除 Tests 目标,除非这是唯一的解决方案。那么,有没有另一种解决方案?

尝试在 Xcode 中构建新应用程序时,我收到大量链接器警告。警告与自动创建的称为测试的目标相关。一些警告的扩展视图如下所示:

Ld /Users/me/Library/Developer/Xcode/DerivedData/My_App-ahfusfuifhsybmalxaykbmfrhylc/Build/Products/Debug-iphoneos/My\ AppTests.xctest/My\ AppTests normal arm64
cd "/Users/me/iPhone Apps/myProducts/My App"
. . .
ld: warning: directory not found for option '-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.2.sdk/Developer/Library/Frameworks'

GenerateDSYMFile /Users/me/Library/Developer/Xcode/DerivedData/My_App-ahfusfuifhsybmalxaykbmfrhylc/Build/Products/Debug-iphoneos/My\ AppTests.xctest.dSYM /Users/me/Library/Developer/Xcode/DerivedData/My_App-ahfusfuifhsybmalxaykbmfrhylc/Build/Products/Debug-iphoneos/My\ AppTests.xctest/My\ AppTests
cd "/Users/me/iPhone Apps/myProducts/My App"
export 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/dsymutil /Users/me/Library/Developer/Xcode/DerivedData/My_App-ahfusfuifhsybmalxaykbmfrhylc/Build/Products/Debug-iphoneos/My\ AppTests.xctest/My\ AppTests -o /Users/me/Library/Developer/Xcode/DerivedData/My_App-ahfusfuifhsybmalxaykbmfrhylc/Build/Products/Debug-iphoneos/My\ AppTests.xctest.dSYM

while processing /Users/me/Library/Developer/Xcode/DerivedData/My_App-ahfusfuifhsybmalxaykbmfrhylc/Build/Intermediates/My App.build/Debug-iphoneos/My AppTests.build/Objects-normal/arm64/My_AppTests.o:
warning: /Users/me/Library/Developer/Xcode/DerivedData/ModuleCache/3K6537SSXYD4O/UIKit-2LM3EQU7VVY4O.pcm: No such file or directory
...
warning: Could not resolve external type c:objc(cs)XCTestCase
...
warning: Could not resolve external type c:objc(cs)_XCTestCaseInterruptionException

我能做些什么来消除这些警告?由于我还不太了解如何使用测试用例,所以我宁愿不删除目标(但如果这是唯一的选择,我会的)。

4

1 回答 1

0

对于这些消息:

warning: Could not resolve external type c:objc(cs) xXX

当您将 Xcode 6 项目更新为 7 时,就会出现问题。简短的回答是将目标上的调试信息格式更改为“DWARF”,仅用于调试配置。

  • 转到构建设置并搜索调试信息格式
  • 将调试设置从“DWARF with dSYM File”更改为“DWARF”
  • 将 Release 设置保留为“DWARF with dSYM File”

这是安全的,因为您不需要 dSYM 文件进行调试构建

于 2016-04-07T07:37:32.303 回答