objective-c - 错误 : Argument list too long: recursive header expansion failed at/Applications/iWork '09/Pages. 应用程序/.../内容/资源

标签 objective-c iphone

当我构建我的项目时,它显示以下错误。这是我第一次遇到这个错误:

Argument list too long: recursive header expansion failed at /Applications/iWork '09/Pages.app/Contents/Resources/Templates/Modern Business Cards.template/Contents/Resources.

我该如何解决这个问题?

最佳答案

这是一个 Xcode“问题”,因为错误是由于在您的 header 搜索路径中进行递归搜索而产生的。我过去通过取消选中标题搜索路径 中项目的“递归”标志并改为直接链接到每个目录来解决这个问题.可能有其他(更好的)方法来解决这个问题,但它似乎有点像 Xcode 的错误,当它遇到无法完全解决的路径时,它没有正确报告错误。

这里还有一些关于这个错误的信息:

Xcode 3.1 problem checking dependencies | Cocoabuilder

有人写道,

Since GCC doesn't natively support recursive search paths, Xcode simulates them by expanding such a path into a discrete -I or -F or -L flag for each directory under the parent directory, but this can rapidly expand to the point that it results in a command line too long to be issued.

The difference between Xcode 3.0 and 3.1 here is that Xcode 3.0 would silently stop expanding the recursive search path if it got too long and simply use whatever it had computed up to that point, which would result in semi-deterministic (and extremely difficult to diagnose) errors for certain types of projects. So now Xcode emits an error if it was unable to fully expand the recursive search path.

So you may need to remove that recursive search path, or modify it to expand to a smaller set of directories, or convert it to a smaller set of non-recursive search paths. Or, alternately, reorganize your source to have fewer directories the path can expand to.

Incidentally, having a smaller set of expansions could also lead to somewhat-faster compilation times, since it's fewer directories that the compiler has to search in when compiling each file. (I don't know the magnitude of impact this would have, though.)

关于objective-c - 错误 : Argument list too long: recursive header expansion failed at/Applications/iWork '09/Pages. 应用程序/.../内容/资源,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3278693/

相关文章:

iphone - 使用适用于 iOS 的 Facebook SDK 3.0 在 friend 墙上发帖

objective-c - 从 XIB 加载 viewForSectionHeader 时遇到问题

objective-c - 当我在 Xcode 6.3 中运行单元测试时,为什么构建失败?

ios - 我们如何在 3D 空间中同时旋转 2 个 UIView 平面

objective-c - 将不同的字符一个一个地添加到 NSString 中?

ios - 将 CMAttitude 与 CMCalibrateMagneticField 结合使用

iphone - 取消 ASIHTTPRequest

iphone - 如何判断应用是否通过教育商店安装?

iphone - 将 block 放在同步 GCD 队列上是否会锁定阻塞并暂停其他队列?

iphone - Xcode 4 中身份检查器下的标签颜色