繁体   English   中英

链接器命令失败错误,xcode?

[英]Linker command failed error, 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)

在此处输入图片说明

如何解决这个错误?

只需删除构建设置中的库路径,然后删除添加的库并再次添加即可

在此处输入图片说明

在我的情况下,它通过删除测试目标(进入项目设置)来工作,在中间的标题为“项目”和“目标”的列中,我删除了我的目标,即“ xyzClientTest”。 (对我来说,它向同一目标抛出了错误)

运行成功。 在评估开发人员的应用程序时,我不需要测试目标。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM