簡體   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