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中设置生成文件名与项目名同名称即可。
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章