Friday, October 19, 2012

Xcode: warning: no rule to process file '$(PROJECT_DIR)/path/to/file' of type for architecture

I came across this warning.
warning: no rule to process file '$(PROJECT_DIR)/path/to/file' of type for architecture 
Silly me! I did something stupid. Looks like I have put a .h file in the list of compiled sources. The list should only have .m files. I dont 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, considering you are running on Xcode4 or above.

  • 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.

No comments:

Post a Comment