简体   繁体   English

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

[英]Linker command failed error, xcode?

I run my app on simulator and it works fine and launches. 我在模拟器上运行我的应用程序,它可以正常运行并启动。

But when I connect the iphone device and run the project I get the below error. 但是,当我连接iPhone设备并运行项目时,出现以下错误。

I don't understand what does it mean 我不明白这是什么意思

     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)

在此处输入图片说明

How to resolve this error? 如何解决这个错误?

just remove the lib paths in build settings and remove your added libs and add them again 只需删除构建设置中的库路径,然后删除添加的库并再次添加即可

在此处输入图片说明

In my case it worked by deleting the test target - went to project settings - in the middle column with titles 'Project' and 'Targets' I deleted my target which was 'xyzClientTest'. 在我的情况下,它通过删除测试目标(进入项目设置)来工作,在中间的标题为“项目”和“目标”的列中,我删除了我的目标,即“ xyzClientTest”。 (for me it was throwing error in the same target) (对我来说,它向同一目标抛出了错误)

It ran successfully. 运行成功。 I didn't need the test target as I was evaluating my developer's app. 在评估开发人员的应用程序时,我不需要测试目标。

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

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