Monday, March 14, 2011

Xcode - warning: no rule to process file

Update: This post covers how you solve a problem in Xcode 3. If you want to know how it's done in Xcode 4, see here instead

I added 2 new files to my IPhone project today. These are two text files (two glsl files) and they should only be included in my main bundle to be accessed at run time.

However, when I build the project I get the following warnings:

warning: no rule to process file '$(PROJECT_DIR)/Content/Shaders/DistanceField.fsh' of type sourcecode.glsl for architecture i386
warning: no rule to process file '$(PROJECT_DIR)/Content/Shaders/DistanceField.vsh' of type sourcecode.glsl for architecture i386


It seems Xcode are trying to process my files during build. Why is that? I don't want that. I just want the files to be included in my bundle. After doing some detective work I found what the problem was:


Xcode automatically added my files into the "Compile Sources" group, for some reason I don't understand. After moving the files over to "Copy Bundle Resources" everything worked fine

12 comments:

  1. Thank you, it fixed the warning I got :)

    ReplyDelete
  2. Thanks Jerry. Very helpful.

    ReplyDelete
  3. Thanks Jerry wish I'd found you sooner!

    Steve

    ReplyDelete
  4. Keep posting these tips, Jerry. Thanks!

    ReplyDelete
  5. great, now what do we do in xcode 4?

    ReplyDelete
  6. See this post

    http://joytek.blogspot.com/2011/09/xcode-4-warning-no-rule-to-process-file.html

    to see how it's done in Xcode 4

    ReplyDelete
  7. Thanks for your post, it helped to solve warning :)

    ReplyDelete