Xcode / clang: why some, not all of my headers give "warning: there is no rule for processing xxx file for arm7 architecture"

I am building an iOS 5 application with ARC using clang on Xcode 4.2 / Lion. It’s good practice for me to try to get rid of as many warnings as possible, but I got lost on this. The application has quite a few classes, but a limited number of header files (8 or 9) provide links to such warnings:

warning: no rule to process file '$(PROJECT_DIR)/TKMyClass.h' of type sourcecode.objj.h for architecture arm7` 

I do not see significant commonality in these headers: a couple is third-party OSS code; the rest are all my own. One of them is an open-source header file C (without the corresponding .c), containing only constants, #defines and enumerations; a pair are UIView and UIViewController subclasses created using Xcode templates; the rest are ordinary Obj-C classes, some of which inherit from NSObject , and some of them do not work. All (from my classes) were created from scratch within the project at different times. Both older and newer classes do not give any warnings.

My project uses a combination of the C ++, Objective-C ++, and Objective-C classes. The warning classes here are mostly Objective-C (their implementations are in .m files), but two third-party classes are implemented in Objective-C ++ (.mm )

The project otherwise builds fine and runs in the simulator and on iDevices.

To my shame, I am not particularly familiar with the project settings pages in Xcode. I expect the solution to be contained somewhere, but I'm not sure where to start without breaking anything.

+7
source share
2 answers

This means that you accidentally added header files for compilation. You need to go into your Build Phases projects and remove all the header files from the Compile Sources section.

+20
source

Check your architecture (project and purpose): standard (armv7) - $ (ARCHS_STANDARD_32_BIT) and go to "Build Pharse" (source compilation) and cheeks, there should not be any .h file there.

+2
source

All Articles