XCode 4 Archiving Error: one or more PCH files were found, but they were invalid

本小妞迷上赌 提交于 2019-12-20 11:35:51

问题


Documenting an odd XCode 4 Error here for future reference:

"one or more PCH files were found, but they were invalid"

Cleaning does not fix the issue, you need to clean the Build Folder by holding down ALT and selecting Product from the menu. The "Clean" entry will now have changed to "Clean Build Folder" which will wipe the bad PCH duplicates and compile without errors.


回答1:


I had to read this a few times to get what was going on. The original poster answered his own question. To fix:

Clean the Build Folder by holding down ALT and selecting Product from the menu. The "Clean" entry will now have changed to "Clean Build Folder" which will wipe the bad PCH duplicates and compile without errors.




回答2:


I was experiencing another problem where this solution helped. After updating an external library I rely on, I got this message:

fatal error: file '/path/to/SomeHeaderFile.h' has been modified since the precompiled header was built

Using a "normal" clean already helped getting rid of it for Debug builds. But when I wanted to use Archive in order to create a new build for the AppStore, the error message remained.

Using that "Clean Build Folder" now finally solved the problem for me!



来源:https://stackoverflow.com/questions/6063574/xcode-4-archiving-error-one-or-more-pch-files-were-found-but-they-were-invalid

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!