2014-09-23 140 views
1

我在模拟器上运行我的应用程序,它工作正常,并启动。链接器命令失败错误,xcode?

但是,当我连接iPhone设备并运行该项目时,我得到以下错误。

我不明白这是什么意思

 Ld /Users/anilkumar/Library/Developer/Xcode/DerivedData/Colgate_Oral_Care_Centre- gnpyidirhzoloxbfrpksaeqeowve/Build/Products/Debug-iphoneos/ColTests.xctest/ColTests normal armv7 
cd /Users/anilkumar/Desktop/Col 
export IPHONEOS_DEPLOYMENT_TARGET=8.0 
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.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 armv7 -bundle -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk -L/Users/anilkumar/Library/Developer/Xcode/DerivedData/Colgate_Oral_Care_Centre-gnpyidirhzoloxbfrpksaeqeowve/Build/Products/Debug-iphoneos -F/Users/anilkumar/Library/Developer/Xcode/DerivedData/Colgate_Oral_Care_Centre-gnpyidirhzoloxbfrpksaeqeowve/Build/Products/Debug-iphoneos -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk/Developer/Library/Frameworks -filelist /Users/anilkumar/Library/Developer/Xcode/DerivedData/Colgate_Oral_Care_Centre-gnpyidirhzoloxbfrpksaeqeowve/Build/Intermediates/Colgate\ Oral\ Care\ Centre.build/Debug-iphoneos/ColTests.build/Objects-normal/armv7/ColTests.LinkFileList -dead_strip -bundle_loader /Users/anilkumar/Library/Developer/Xcode/DerivedData/Colgate_Oral_Care_Centre-gnpyidirhzoloxbfrpksaeqeowve/Build/Products/Debug-iphoneos/Col.app/Col -framework XCTest -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=8.0 -framework XCTest -framework UIKit -framework Foundation -Xlinker -dependency_info -Xlinker /Users/anilkumar/Library/Developer/Xcode/DerivedData/Colgate_Oral_Care_Centre-gnpyidirhzoloxbfrpksaeqeowve/Build/Intermediates/Colgate\ Oral\ Care\ Centre.build/Debug-iphoneos/ColTests.build/Objects-normal/armv7/ColTests_dependency_info.dat -o /Users/anilkumar/Library/Developer/Xcode/DerivedData/Colgate_Oral_Care_Centre-gnpyidirhzoloxbfrpksaeqeowve/Build/Products/Debug-iphoneos/ColTests.xctest/ColTests 

ld: file not found: /Users/anilkumar/Library/Developer/Xcode/DerivedData/Colgate_Oral_Care_Centre-gnpyidirhzoloxbfrpksaeqeowve/Build/Products/Debug-iphoneos/Col.app/Col 
    clang: error: linker command failed with exit code 1 (use -v to see invocation) 

enter image description here

如何解决这个问题?

+0

向我们展示完整的链接器命令行(从构建日志窗格)。 – trojanfoe 2014-09-23 09:26:28

+0

@trojanfoe已更新 – WISHY 2014-09-23 09:30:25

+0

确定查看'文件未找到'错误。看看该目录是否存在。 – trojanfoe 2014-09-23 09:32:17

回答

0

只是删除在构建设置的lib路径,并删除您添加库,并再次将它们添加

enter image description here

+0

它已经是空的 – WISHY 2014-09-23 09:54:22

+0

不添加任何库 – raki 2014-09-23 09:59:21

+0

我没有bt它是空的。虽然该应用程序在仿真器上启动,但不在连接的设备上启动。 – WISHY 2014-09-23 10:01:15

0

对我来说,它的工作通过删除测试目标 - 去项目设置 - 在标题为“项目”和“目标”的中间栏我删除了我的目标,即'xyzClientTest'。 (对我来说,它是在相同的目标抛出错误)

它成功运行。我在评估开发者的应用时并不需要测试目标。

相关问题