开发者

Error when compiling for device but not simulator

开发者 https://www.devze.com 2023-01-14 06:50 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消