Error when compiling for device but not simulator
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 directo开发者_运维知识库ry
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
Try
#import <objc/runtime.h>
instead of
#import <objc/objc-class.h>
This worked for me, both for simulator & device.
On iOS it's
#import <objc/runtime.h>
Shouldn't that be:
#import <objc/objc.h>
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.
精彩评论