Xcode/clang: Why do some, not all, of my headers give "warning: no rule to process file xxx for architecture arm7"
Asked Answered
Y

2

7

I am building an iOS 5 app with ARC using clang on Xcode 4.2/Lion. Good practice for me is to try to get rid of as many warnings as possible but I'm lost on this one. The app has quite a few classes, but a limited number of their header files (8 or 9) give linker warnings like this:

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

I don't see any significant commonalities across these headers: a couple are 3rd party OSS code; the rest are all my own. One is a plain-C header file (with no corresponding .c) containing nothing but constants, #defines and enums; a couple are UIView and UIViewController subclasses created with Xcode's templates; the rest are ordinary Obj-C classes, some of which inherit from NSObject and some of which don't. All (of my classes) were created from scratch within the project at various times. Both older and newer classes give no warnings.

My project uses a mix of C++, Objective-C++ and Objective C classes. The warning-generating classes here are mostly Objective C (their implementations are in .m files) but the two 3rd 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'm not particularly familiar with the project settings pages in Xcode. I expect the solution is contained in there somewhere but I'm not sure where to start without breaking things.

Yasminyasmine answered 9/1, 2012 at 14:57 Comment(0)
A
20

That means that you have accidentally added header files to be compiled. You need to go into your projects Build Phases and remove all header files from the Compile Sources section.

Adiel answered 9/1, 2012 at 15:1 Comment(1)
the weird thing (for me) is that xcode adds them itself when adding a new file to the project via the wizard.Cykana
S
2

Check your Architecture (Project and Target): Standard (armv7) - $(ARCHS_STANDARD_32_BIT) and go to Build Pharse (Compile Source) and cheek there should not be any .h file added there.

Stettin answered 9/1, 2012 at 15:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.