xcode / iPhone 的构建规则

发布于 2024-12-07 11:01:06 字数 749 浏览 0 评论 0原文

我将 facebook SDK 合并到更新中,我收到四个文件的编译器警告,在我的目标之一中,每个文件收到两个这样的警告。

[警告]警告:没有规则可以处理架构armv7的sourcecode.ch类型的文件“$(PROJECT_DIR)/APP_NAME/Facebook.h”

[警告]警告:没有规则可以处理文件“$( PROJECT_DIR)/APP_NAME/Facebook.h' 类型为 sourcecode.ch,适用于架构 armv6,

而在另一个目标中,每个文件仅生成一个警告,

[WARN]警告: 没有规则可以处理架构 i386 类型的 sourcecode.ch 文件 '$(PROJECT_DIR)/APP_NAME/FBConnect.h'

在 facebook SDK 的文档中, 他们告诉我将 i386 添加到有效架构中构建设置,但他们没有提及任何“构建规则”。奇怪的是,我已经将相同的 facebook SDK 合并到另一个应用程序中,没有出现任何问题。我能看到的唯一区别是该项目已经有两个目标,并且(每个)这些警告仅来自其中一个。有人可以告诉我如何为这四个文件制定构建规则吗?我需要armv6和armv7以及i386的构建规则吗?

除了不同的 -info.plist 和不同的 .pch 文件之外,构建设置完全相同。我应该补充一点,Facebook 功能在模拟器上运行良好,但在使用任一构建目标的任何测试设备中都运行不佳。

非常感谢。

Im incorporating the facebook SDK into an update and i get compiler warnings for four files,in one of my targets each file gets two warnings like these.

[WARN]warning: no rule to process file '$(PROJECT_DIR)/APP_NAME/Facebook.h' of type sourcecode.c.h for architecture armv7

[WARN]warning: no rule to process file '$(PROJECT_DIR)/APP_NAME/Facebook.h' of type sourcecode.c.h for architecture armv6

and in the other target each file only generates one warning,

[WARN]warning: no rule to process file '$(PROJECT_DIR)/APP_NAME/FBConnect.h' of type sourcecode.c.h for architecture i386

in the documentation for the facebook SDK they tell me to add i386 to the valid architectures in the build settings, but they dont say anything about any 'build rules' the strange thing is that I already incorporated the same facebook SDK into another app without a single problem. The only difference that I can see is that this project already had two targets, and (each of) these warnings are only coming from one of them. Can anybody give me a clue how to make a build rule for these four files? do I need build rules for armv6 and armv7 AND i386?

the build settings are exactly the same except for a different -info.plist and different .pch file each. I should add that the facebook functionality is working fine on the simulator but not in any test device using either of the build targets.

thanks so much.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

一袭白衣梦中忆 2024-12-14 11:01:06

假设您使用的是 Xcode 4,依赖项检查器可能会感到困惑,因为要编译的 C 文件列表中有 .h 文件。

所以......导航到目标的“构建阶段”选项卡。 (单击项目,然后单击目标的名称,然后单击“构建阶段”选项卡。)

确保没有将任何 .h 文件拖到“编译源”部分中。

在导入代码时,通常只是将整个代码拖到该部分中,而没有意识到 .h 文件在技术上没有经过编译,并且依赖项检查器不够智能,无法吐出更有用的错误消息。

Assuming you're using Xcode 4, it's likely that the dependency checker is confused because there are .h files in list of C files to be compiled.

So.... Navigate to your target's "Build Phases" tab. (Click on the project, then click on the target's name, then click on the "Build Phases" tab.)

Ensure that you didn't drag any .h files into the "Compile Sources" section.

It's common, when importing code, to just drag the whole lot into that section, not realizing that .h files aren't technically compiled, and the dependency checker isn't smart enough to spit out more helpful error message.

水中月 2024-12-14 11:01:06

http://dhilipsiva.blogspot.in/2012/10/ xcode-warning-no-rule-to-process-file.html

该列表应该只包含 .m 文件。我不知道是否可以在其中放入 .c 文件,但不应该有任何其他文件类型。我喜欢一些开发人员甚至将 Javascript 文件拖到编译的源代码中。如果您遇到同样的问题,您可能应该从编译源列表中删除任何非“.m”文件。假设您在 Xcode4 上运行,以下是您的操作方法。

打开项目目标的“构建阶段”选项卡。 (单击项目,然后单击目标名称,然后单击“构建阶段”选项卡)。
在编译源部分中,确保除了 .m 文件之外没有任何文件。

快乐黑客。

http://dhilipsiva.blogspot.in/2012/10/xcode-warning-no-rule-to-process-file.html

The list should only have .m files. I don't know if we can put a .c file in it, but there should not be any other filetype. I fond that some developers even dragged Javascript files into the compiled sources. If you are facing the same problem, you should probably remove any non '.m' files from list of compiled sources. Here is how you do it, assuming you are running on Xcode4.

Open up your project target's "Build Phases" tab. (Click on the project, then the target's name, and then on the "Build Phases" tab).
In the the compiled sources section, make sure that you dont have any files other than .m files.

Happy Hacking.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文