build rules for xcode / iPhone
Asked Answered
S

2

30

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.

Saldivar answered 30/9, 2011 at 0:46 Comment(0)
G
115

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.

Glyoxaline answered 15/10, 2011 at 7:26 Comment(1)
Thanks a lot for this. I didn't realize that ALL the other files listed there are .m files ONLY. I got on .h in there, removing it solves the problem. Cheers mate.Hobard
L
7

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.

Laos answered 19/10, 2012 at 10:9 Comment(2)
+1 for mentioning that ANY non-.m files should be removed. I was stuck with a .c fileCupronickel
+1 for 'remove any non '.m'' phrase in bold. I use ZipArchive to unzip a downloaded file. All the header files were compiled at runtime. Removed the header files as described and 8 warnings were gone.Beeman

© 2022 - 2024 — McMap. All rights reserved.