Reputation: 65
I'm new to objective c and going through some books to learn it.
The applications I create for the sample applications give me a compiler warning: warning: no rule to process file... Through some googling, I found that the problem is that the file it's trying to process is in the Compile Sources window of the Build Phase. When I remove the .h file, the warning goes away.
My question is, how is it getting in there? I haven't been able to narrow down if it happens every single time, but in my current application, if I add a new Objective C class, it will automatically place the .h file in the Compile Sources window. So I'm wondering if anyone can tell me why that might be happening and how I can stop it. Thanks so much everyone.
EDIT: I just restarted XCode and it no longer adds the .h and .m files together to the Compile Sources window (it only adds the .m file).
Upvotes: 1
Views: 540
Reputation: 3401
Just select "add to project" from my Xcode menu for new .m and .h files, check add to target, and the then they compile and link when Build for my iPhone target.
OR
Check what the path is relative to (open the ‘File Inspector’). May be you were migrating files and accidentally they got marked as ‘relative to group’, and this caused files not to be found by the compiler. Heck, this is rather confusing for me as well.
Upvotes: 1