tags:

views:

49

answers:

3

I get the following error when compiling my project for the device, but not the simulator: error: objc/objc-class.h: No such file or directory

One of the files i have imports objc/objc-class.h and this is where it chokes.

Base SDK is iPhone OS 4.0 and deployment target is OS 3.2

Thanks

+1  A: 

Shouldn't that be:

#import <objc/objc.h> 
No one in particular
A: 

Do you have different include paths in your debug and release build settings?

If you don't want to play with the include paths, then adding the objc-class.h file to your project will also allow Xcode to find it.

hotpaw2
Manually added the objc-class.h file and it compiles now. I dont understand why it would work before for the simulator and not the device. All the include paths are the same for both.
Nick
A: 

Try

#import <objc/runtime.h>

instead of

#import <objc/objc-class.h>

This worked for me, both for simulator & device.

Yan
Thank you. That was all it took.
Nick