错误:链接器命令失败,退出代码为1(使用-v查看invoc

时间:2012-10-03 12:29:46

标签: objective-c xcode error-handling

我收到以下错误消息。我已经尝试了stackoverflow上的消息并搜索了其他解决方案,但它们不起作用。任何人都可以帮忙吗?

>  setenv IPHONEOS_DEPLOYMENT_TARGET 6.0
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -bundle -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk -L/Users/stuart/Library/Developer/Xcode/DerivedData/tab_project-evwkhgsuxscoetcgithrfgftafyk/Build/Products/Debug-iphonesimulator -F/Users/stuart/Library/Developer/Xcode/DerivedData/tab_project-evwkhgsuxscoetcgithrfgftafyk/Build/Products/Debug-iphonesimulator -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Library/Frameworks -filelist "/Users/stuart/Library/Developer/Xcode/DerivedData/tab_project-evwkhgsuxscoetcgithrfgftafyk/Build/Intermediates/tab project.build/Debug-iphonesimulator/tab projectTests.build/Objects-normal/i386/tab projectTests.LinkFileList" -bundle_loader "/Users/stuart/Library/Developer/Xcode/DerivedData/tab_project-evwkhgsuxscoetcgithrfgftafyk/Build/Products/Debug-iphonesimulator/tab project.app/tab project" -Xlinker -objc_abi_version -Xlinker 2 -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=6.0 -framework SenTestingKit -framework UIKit -framework Foundation -o "/Users/stuart/Library/Developer/Xcode/DerivedData/tab_project-evwkhgsuxscoetcgithrfgftafyk/Build/Products/Debug-iphonesimulator/tab projectTests.octest/tab projectTests"

ld: file not found: /Users/stuart/Library/Developer/Xcode/DerivedData/tab_project-evwkhgsuxscoetcgithrfgftafyk/Build/Products/Debug-iphonesimulator/tab project.app/tab project
clang: error: linker command failed with exit code 1 (use -v to see invocation)

1 个答案:

答案 0 :(得分:0)

您可能已经通过拖放将文件添加到解决方案/项目中。

试试这个:

  1. 选择您的项目
  2. 转到“构建阶段”选项卡
  3. 展开编译源
  4. 点击“+”并添加您希望包含在构建
  5. 中的所有* .m文件