黑马程序员技术交流社区

标题: Xcode 报错啊 NSObjec [打印本页]

作者: aofex    时间: 2015-7-2 11:18
标题: Xcode 报错啊 NSObjec
本帖最后由 aofex 于 2015-7-2 15:23 编辑

admindeMac-Pro:8.5练习 admin$ cc 2.m -framework Foundation
2.m:28:23: error: cannot find interface declaration for 'NSObject', superclass
      of 'BodyData'
@interface BodyData : NSObject
~~~~~~~~~~~~~~~~~~~   ^
2.m:28:12: warning: class 'BodyData' defined without specifying a base class
      [-Wobjc-root-class]
@interface BodyData : NSObject
           ^
2.m:28:20: note: add a super class to fix this problem
@interface BodyData : NSObject
                   ^
2.m:95:21: error: cannot find interface declaration for 'NSObject', superclass
      of 'Person'
@interface Person : NSObject
~~~~~~~~~~~~~~~~~   ^
2.m:95:12: warning: class 'Person' defined without specifying a base class
      [-Wobjc-root-class]
@interface Person : NSObject
           ^
2.m:95:18: note: add a super class to fix this problem
@interface Person : NSObject
                 ^
2.m:134:25: warning: class method '+new' not found
      (return type defaults to 'id') [-Wobjc-method-access]
    Person *p = [Person new];
                        ^~~
2.m:139:29: warning: class method '+new' not found
      (return type defaults to 'id') [-Wobjc-method-access]
    BodyData *b = [BodyData new];
代码已经包含框架了,高手们  帮我看看啊  感谢了!!!!




欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) 黑马程序员IT技术论坛 X3.2