收到iOS12.0更新推送,網上各種說更新之后手機流暢度能提升70%,那個心里激動的呀,對于iOS開發(fā)者來說,更新手機必然需要更新Xcode,要不真機都不讓運行,Xcode從9.4.1更新到10.0之后開始報編譯錯誤,下面來說說如何解決。
報錯1:
:-1: Multiple commands produce '/Users/Simon/Library/Developer/Xcode/DerivedData/YueMeTV-emcpejoowcofgfdbrhckdzciyxgk/Build/Products/Debug-iphoneos/YueMeTV.app/Info.plist':
1) Target 'YueMeTV' (project 'YueMeTV') has copy command from '/Users/Simon/Desktop/公信/SmartHome_UIUE_New/Src/YueMeTV/yueme_cloud/Info.plist' to '/Users/Simon/Library/Developer/Xcode/DerivedData/YueMeTV-emcpejoowcofgfdbrhckdzciyxgk/Build/Products/Debug-iphoneos/YueMeTV.app/Info.plist'
2) Target 'YueMeTV' (project 'YueMeTV') has process command with output '/Users/Simon/Library/Developer/Xcode/DerivedData/YueMeTV-emcpejoowcofgfdbrhckdzciyxgk/Build/Products/Debug-iphoneos/YueMeTV.app/Info.plist'
文中的步驟是
Xcode->File->Project Settings->Build System->Legacy Build System.
1、InXcode, go toFile->Project/Workspace settings
2、Change thebuild systemtoLegacy Build system
報錯2:
ld: warning: directory not found for option '-F/Users/Simon/Desktop/公信/SmartHome_UIUE_New/Src/YueMeTV/tools/TYLoginSDK'
ld: library not found for -lstdc++.6.0.9
clang: error: linker command failed with exit code 1 (use -v to see invocation)
解決完上述再編譯報缺少
lstdc++.6.0.9庫,在新xcode中發(fā)現(xiàn)已經去掉libstdc++.6.0.9,這就意味著項目中如果有第三方或者自己使用到lstdc++.6.0.9的地方都會報編譯錯誤。
臨時解決方案
1、 找到Xcode10之前的版本,搜索下面路勁找到libstdc++.6.0.9,
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib
2、拷貝libstdc++.6.0.9到Xcode10.0對應路徑下,再編譯就不會報錯了。
參考鏈接:
Xcode 10 (iOS 12) does not contain libstdc++6.0.9
關于Xcode 10.0編譯不通過的問題 stdc++.6.0.9