xcode修改項目名後反覆出現 clang error

 Ld /Users/lpf/Library/Developer/Xcode/DerivedData/項目名稱-hlaftrutsszdxidyyvgbghpejcia/Build/Products/Debug-iphoneos/項目名稱Tests.xctest/項目名稱Tests normal armv7
    cd "/Users/lpf/Downloads/項目名稱iph/項目名稱iphone 3"
    export IPHONEOS_DEPLOYMENT_TARGET=7.1
    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.4.sdk -L/Users/lpf/Library/Developer/Xcode/DerivedData/項目名稱-hlaftrutsszdxidyyvgbghpejcia/Build/Products/Debug-iphoneos -F/Users/lpf/Library/Developer/Xcode/DerivedData/項目名稱-hlaftrutsszdxidyyvgbghpejcia/Build/Products/Debug-iphoneos -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.4.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.4.sdk/Developer/Library/Frameworks -filelist /Users/lpf/Library/Developer/Xcode/DerivedData/項目名稱-hlaftrutsszdxidyyvgbghpejcia/Build/Intermediates項目名稱.build/Debug-iphoneos/項目名稱Tests.build/Objects-normal/armv7項目名稱Tests.LinkFileList -dead_strip -bundle_loader /Users/lpf/Library/Developer/Xcode/DerivedData/項目名稱-hlaftrutsszdxidyyvgbghpejcia/Build/Products/Debug-iphoneos項目名稱.app/項目名稱 -framework XCTest -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=7.1 -framework XCTest -framework UIKit -framework Foundation -Xlinker -dependency_info -Xlinker /Users/lpf/Library/Developer/Xcode/DerivedData/項目名稱-hlaftrutsszdxidyyvgbghpejcia/Build/Intermediates/項目名稱.b

ld: file not found: /Users/lpf/Library/Developer/Xcode/DerivedData/項目名稱-hlaftrutsszdxidyyvgbghpejcia/Build/Products/Debug-iphoneos/項目名稱app/項目名稱
clang: error: linker command failed with exit code 1 (use -v to see invocation)


原因:我們在修改項目名稱後,並未自動修改test部分的鏈接設置
解決辦法:在TARGETS->項目名稱Tests->Build Settings->Bundle Loader中設置生成文件名與項目名同名稱即可。
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章