"input is not a PCH file" - Xcode

"input is not a PCH file" - Xcode

我正在使用 PCH 文件处理客户端代码,但出现此错误。

error: input is not a PCH file: '/Users/XXX/Library/Developer/Xcode/DerivedData/Stockfish-gmtlyxbgbyyplbgwrhzsazbjjtxp/Build/Intermediates.noindex/PrecompiledHeaders/SharedPrecompiledHeaders/2449868381699930613/Stockfish_Prefix.pch.gch' fatal error: file '/Users/XXX/Library/Developer/Xcode/DerivedData/Stockfish-gmtlyxbgbyyplbgwrhzsazbjjtxp/Build/Intermediates.noindex/PrecompiledHeaders/SharedPrecompiledHeaders/2449868381699930613/Stockfish_Prefix.pch.gcinput is not a PCH file:

我尝试删除派生数据、清理和重建,但我仍然遇到此错误。几个月前它还在工作。

知道哪里出了问题吗?

编辑:build settings

本例中的错误不言自明。如果您查看您发布的消息的最后,它说 Stockfish_Prefix.pch.gcinput 不是 PCH 文件。这是正确的,因为它的文件扩展名为 gcinput。我调试它的第一步是进入你的构建设置并搜索 pre-compiled。确保它指定的文件存在,并且扩展名是 .pch.

AshokPolu 找到的解决方案:

Open the Xcode project, Try to do the following steps, XCode->File->Workspace Settings->Build System, select the option "Legacy Build System".