升級(jí)到Xcode7后洛二,編譯項(xiàng)目出現(xiàn)大片警示??攀操,多數(shù)是使用了第三方的庫庶灿,問題特征如下:
warning:
/Users/.../Library/Developer/Xcode/DerivedData/ModuleCache/HJUIXHI06SFW/CoreGraphics-1YQ59ILDR3NYI.pcm: No such file or directory while processing
/Users/.../Library/Developer/Xcode/DerivedData/.../Build/Products/Release-iphoneos/libcocos2d.a(someClass.o):
warning:
/Users/.../Library/Developer/Xcode/DerivedData/ModuleCache/HJUIXHI06SFW/CoreGraphics-1YQ59ILDR3NYI.pcm: No object file for requested architecture while processing
/Users/.../Library/Developer/Xcode/DerivedData/.../Build/Products/Release-iphoneos/libcocos2d.a(someClass.o):warning: Could not resolve external type c:@S@CGPoint
2016.1更新#
Lots of warnings when building with Xcode 7 with 3rd party libraries
Build Settings
- Precompile Prefix (GCC_PRECOMPILE_PREFIX_HEADER) = NO
- Debug Information Format (DEBUG_INFORMATION_FORMAT) = DWARF with dSYM
- Enabled Modules (C and Objective-C) (CLANG_ENABLE_MODULES) = NO
蘋果員工在下方評論給出了方案
Build Settings
Enabled Modules (C and Objective-C) (CLANG_ENABLE_MODULES) = NO
我按apple staff的方案并沒解決,反而報(bào)了很多clang的錯(cuò)誤梗摇。
我自己的配置方法是通過如下解決:
Build Settings
Enabled Clang Module Debugging = NO
但是這個(gè)問題自己體驗(yàn)是clear后消失, 但在編譯幾次后又可能會(huì)出現(xiàn)鹊漠。
舊#
我盡可能的測試了所有測試方法,solution1和2是可以解決的浙滤,但是還是根據(jù)自己的需求來吧。
Solution 1##
Under the Project Target > Build Settings
change the “Debug Information Format” from “DWARF with dSYM File” to “DWARF”.
主要是忽略了用于debug的dSYM文件气堕。
不推薦給使用了依賴dSYM文件進(jìn)行錯(cuò)誤追蹤的開發(fā)者,比如集成了友盟sdk之類的纺腊。
Solution 2##
Deployment Postprocessing = Yes
(DEPLOYMENT_POSTPROCESSING=YES)
Generate Debug Symbols = No
(GCC_GENERATE_DEBUGGING_SYMBOLS=NO)
Symbols Hidden by Default = Yes
(GCC_SYMBOLS_PRIVATE_EXTERN=YES)
這種解決方法是直接不生成debug的警示??
Solution 3##
To delete the derived data, Alt-Click on "Go" in the Finder top bar. Then select "Library", navigate to Developer/Xcode/DerivedData and delete the entire folder.
或者直接使用以下命令清除
sudo rm -rf ~/Library/Developer/Xcode/DerivedData/
清理緩存,不一定湊效
Solution 4##
來自stack over flow的網(wǎng)友Elise van Looij的解決方法
I don't have a good answer to this question: I've considered removing the question, but it is a real problem and there are only one or two other mentions of it on the internet, with no solutions either. So, if you're struggling with this: I feel your pain but unfortunately the only way I've found to deal with it is to start a new project and import all classes and other resources. But please feel free to contribute and if you come up with something better than starting over, I'll be happy to award you the green V and upvote and all that.
以上三種辦法不能滿足你的需求可以嘗試...
如果你有好的解決方案茎芭,在下面??回復(fù)分享給大家吧揖膜!