在Mac OS X下使用命令行编译Objective-C程序
命令:clang -fobjc-arc -framework Foundation <prog file> -o <exe file>
样例:
hello.h
——————
#import <Foundation/Foundation.h>
hello.m
——————
#import “hello.h”
int main()
{
NSLog(@“hello");
return 0;
}
$ clang -fobjc-arc -framework Foundation hello.m -o hello
$ ./hello #执行
相关推荐
WorldofiOs 2016-01-15
Swen 2011-08-01
bxqybxqy 2012-11-26
shipinsky 2019-07-01
唯美st丶 2016-05-05
JINLINHUOFENG 2014-01-04
xingweiyong 2016-03-09
madaxin 2016-01-15
81751493 2015-11-24
81570790 2012-02-27
88497010 2012-01-17
89283517 2012-01-17
87214552 2012-01-14
81731290 2011-10-24
CaiKanXP 2017-08-12
oraulvo 2019-05-05
hyunbar 2016-07-24
cardinal 2016-07-23
88497010 2014-03-04