升级xcode10.0后,编译原有正常工程遇到的坑

一大早上看到可以升级xcode10,心情美美哒。然而升级完,开始编译原有正常工程,却报错了。

提示有重复的文件。

问题1:

  • Multiple commands produce '/Users/wmh/Library/Developer/Xcode/DerivedData/GS_Mobile-dsuqtvptcdfuyyfqjtnevxwiayup/Build/Products/Debug-iphonesimulator/GS_Mobile.app/Info.plist':
  • 1) Target 'GS_Mobile' (project 'GS_Mobile') has copy command from '/Users/wmh/Project/GSYD_XinJiang/GS_Mobile/Tools/FSCalendar/Info.plist' to '/Users/wmh/Library/Developer/Xcode/DerivedData/GS_Mobile-dsuqtvptcdfuyyfqjtnevxwiayup/Build/Products/Debug-iphonesimulator/GS_Mobile.app/Info.plist'
  • 2) Target 'GS_Mobile' (project 'GS_Mobile') has copy command from '/Users/wmh/Project/GSYD_XinJiang/GS_Mobile/Tools/MJExtension/Info.plist' to '/Users/wmh/Library/Developer/Xcode/DerivedData/GS_Mobile-dsuqtvptcdfuyyfqjtnevxwiayup/Build/Products/Debug-iphonesimulator/GS_Mobile.app/Info.plist'
  • 3) Target 'GS_Mobile' (project 'GS_Mobile') has process command with output '/Users/wmh/Library/Developer/Xcode/DerivedData/GS_Mobile-dsuqtvptcdfuyyfqjtnevxwiayup/Build/Products/Debug-iphonesimulator/GS_Mobile.app/Info.plist'

问题2

  • Multiple commands produce '/Users/wmh/Library/Developer/Xcode/DerivedData/GS_Mobile-dsuqtvptcdfuyyfqjtnevxwiayup/Build/Products/Debug-iphonesimulator/GS_Mobile.app/jquery-1.9.1.min.js':
  • 1) Target 'GS_Mobile' (project 'GS_Mobile') has copy command from '/Users/wmh/Project/GSYD_XinJiang/GS_Mobile/Class/Apply/mailhelp/jquery-1.9.1.min.js' to '/Users/wmh/Library/Developer/Xcode/DerivedData/GS_Mobile-dsuqtvptcdfuyyfqjtnevxwiayup/Build/Products/Debug-iphonesimulator/GS_Mobile.app/jquery-1.9.1.min.js'
  • 2) Target 'GS_Mobile' (project 'GS_Mobile') has copy command from '/Users/wmh/Project/GSYD_XinJiang/GS_Mobile/Tools/library/help1/jquery-1.9.1.min.js' to '/Users/wmh/Library/Developer/Xcode/DerivedData/GS_Mobile-dsuqtvptcdfuyyfqjtnevxwiayup/Build/Products/Debug-iphonesimulator/GS_Mobile.app/jquery-1.9.1.min.js'
     

报错原因:重复,由于重复文件是其他部门有依赖,所以有两种解决方案

方案1--> 修改了xcode的配置暂时解决了编译报错的问题。

xcode--file--project settings--Build System--legacy Build System

再次编译,提示,遇到问题

library not found for -l"stdc++.6.0.9"

原因:Xcode10取消了6.0.9的支持,但是在xcode9上面可以找到,

解决办法:

(打开Build Phases--Link Binary With Libraries,删除6.0.9依赖 )

如果依赖c++6.0.9的SDK是第三方SDK,需要联系第三方,等待第三方更新

如果是自己的文件引用了c++,请替换对c++库的使用,重新编译,

针对这个“library not found for -l"stdc++.6.0.9"问题,也可以使用下面链接的方法解决:

https://blog.csdn.net/Kevin_love_Chrissy/article/details/82805770

方案2--->  1,选择打开所在的项目Target ----> Build Phases ---->Copy Bundle Resources  ;2,删除报错的那些文件,

猜你喜欢

转载自blog.csdn.net/Kevin_love_Chrissy/article/details/82759257