zoukankan      html  css  js  c++  java
  • xcode修改项目名后反复出现 clang error

    xcode修改项目名后反复出现 clang error,  提示 ld: file not found . 

    并且该错误并不是出现在项目编译阶段,而是项目的Tests 的link阶段, 同时提示 xctest 出现错误,详细描述如下:

    Ld /Users/iOSDev/Library/Developer/Xcode/DerivedData/iddn-apnitmxvcbgmcoczqswzexnvbxai/Build/Products/Debug-iphoneos/iddnTests.xctest/iddnTests normal arm64
    cd /Users/iOSDev/dev/propertymanager
    export IPHONEOS_DEPLOYMENT_TARGET=7.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 arm64 -bundle -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk -L/Users/iOSDev/Library/Developer/Xcode/DerivedData/iddn-apnitmxvcbgmcoczqswzexnvbxai/Build/Products/Debug-iphoneos -F/Users/iOSDev/Library/Developer/Xcode/DerivedData/iddn-apnitmxvcbgmcoczqswzexnvbxai/Build/Products/Debug-iphoneos -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.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.1.sdk/Developer/Library/Frameworks -filelist /Users/iOSDev/Library/Developer/Xcode/DerivedData/iddn-apnitmxvcbgmcoczqswzexnvbxai/Build/Intermediates/iddn.build/Debug-iphoneos/iddnTests.build/Objects-normal/arm64/iddnTests.LinkFileList -dead_strip -bundle_loader /Users/iOSDev/Library/Developer/Xcode/DerivedData/iddn-apnitmxvcbgmcoczqswzexnvbxai/Build/Products/Debug-iphoneos/PMS.app/PMS -framework XCTest -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=7.0 -framework XCTest -framework UIKit -framework Foundation -Xlinker -dependency_info -Xlinker /Users/iOSDev/Library/Developer/Xcode/DerivedData/iddn-apnitmxvcbgmcoczqswzexnvbxai/Build/Intermediates/iddn.build/Debug-iphoneos/iddnTests.build/Objects-normal/arm64/iddnTests_dependency_info.dat -o /Users/iOSDev/Library/Developer/Xcode/DerivedData/iddn-apnitmxvcbgmcoczqswzexnvbxai/Build/Products/Debug-iphoneos/iddnTests.xctest/iddnTests

    ld: file not found: /Users/iOSDev/Library/Developer/Xcode/DerivedData/iddn-apnitmxvcbgmcoczqswzexnvbxai/Build/Products/Debug-iphoneos/PMS.app/PMS
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

    则该错误导致的原因是,我们在修改项目名称后,并未自动修改test部分的链接设置。

    解决该问题的方法是: 修改bundler loader setting.

    菜单 project->Scheme->Edit Scheme.   取消test执行的操作。  这是最简单粗暴的方法。

  • 相关阅读:
    机器学习之--数据构造,函数图显示
    python 用xlwt包把数据导出到excel表中
    python实现Hbase
    Hbase命令
    scrapy Formrequest用法(豆瓣登录案例)
    scrapy meta不用pipe用命令-o
    scrapy之Crawspider 腾讯招聘实战案例
    scrapy选择器归纳
    scrapy response.xpath可以提取包含字符XX的标签
    初涉.....编码__列表__字典
  • 原文地址:https://www.cnblogs.com/ToDoToTry/p/4119836.html
Copyright © 2011-2022 走看看