@import<Foundation/Foundation.h>
@interface CCar : NSObject
{
@public
int speed;
int wheel;
}
-(void) run;
@end
@implementation CCar
-(void) run
{
NSLog(@"速度为%d,轮子个数为%d",speed,wheel);
}
@end
int mian()
{
CCar *p = [CCar new];
p->speed = 100;
p->wheel = 3;
[p run];
return 0;
}
为什么编译会出现这样
TUSMtekiMacBook-Pro-2:q tusm$ cc 01-cc.m framework Foundation
clang: error: no such file or directory: 'framework'
clang: error: no such file or directory: 'Foundation' |