file not found app文件

昨天svn迁移。然后又一次check out之后编译遇到这个错误。

Ld Build/Products/Debug-iphonesimulator/wiseCloudCrmTests.xctest/wiseCloudCrmTests normal x86_64
    cd /Users/zhangsuya/Desktop/root/trunk
    export IPHONEOS_DEPLOYMENT_TARGET=7.1
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.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 x86_64 -bundle -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.3.sdk -L/Users/zhangsuya/Desktop/root/trunk/Build/Products/Debug-iphonesimulator -F/Users/zhangsuya/Desktop/root/trunk/Build/Products/Debug-iphonesimulator -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.3.sdk/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.3.sdk/Developer/Library/Frameworks -filelist /Users/zhangsuya/Desktop/root/trunk/Build/Intermediates/wiseCloudCrm.build/Debug-iphonesimulator/wiseCloudCrmTests.build/Objects-normal/x86_64/wiseCloudCrmTests.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -bundle_loader /Users/zhangsuya/Desktop/root/trunk/Build/Products/Debug-iphonesimulator/wiseCloudCrm.app/wiseCloudCrm -Xlinker -objc_abi_version -Xlinker 2 -framework XCTest -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=7.1 -framework XCTest -framework UIKit -framework Foundation -Xlinker -dependency_info -Xlinker /Users/zhangsuya/Desktop/root/trunk/Build/Intermediates/wiseCloudCrm.build/Debug-iphonesimulator/wiseCloudCrmTests.build/Objects-normal/x86_64/wiseCloudCrmTests_dependency_info.dat -o /Users/zhangsuya/Desktop/root/trunk/Build/Products/Debug-iphonesimulator/wiseCloudCrmTests.xctest/wiseCloudCrmTests

ld: file not found: /Users/zhangsuya/Desktop/root/trunk/Build/Products/Debug-iphonesimulator/wiseCloudCrm.app/wiseCloudCrm
clang: error: linker command failed with exit code 1 (use -v to see invocation)

从来没遇到过,直接蒙圈了......(一大堆看不到的提示)。

琢磨良久方才get到重点:

ld: file not found: /Users/zhangsuya/Desktop/root/trunk/Build/Products/Debug-iphonesimulator/wiseCloudCrm.app/wiseCloudCrm
这句话的意思是编译器想找到这个文件却没找到。

进入

/Users/zhangsuya/Desktop/root/trunk/Build/Products/Debug-iphonesimulator/目录下查看发现并没有wiseCloudCrm而是



app文件由原来英文wiseCloudCrm变成了 沟通汇

再去target下查看product name果然变成了沟通汇。问同事才知道是他改的名字(....不早说),

我把product name改为wiseCloudCrm然后点击工具栏上的product下的clean再编译正确。

同一时候又一个问题来了。即使他改了product name后他的能编译通过,而提交我更新后我的却编译不通过。原因是什么呢?


原因应该就是他没有clean。

(感兴趣的同学能够试一下)。


原文地址:https://www.cnblogs.com/zhchoutai/p/6718497.html