$ vi hello.m
$ cat hello.m
#import <Foundation/Foundation.h>
int main (int argc, const char * argv[])
{
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
NSLog (@"Hello world!!");
[pool drain];
return 0;
}
$ gcc -framework Foundation hello.m -o hello
$ ./hello
2010-12-10 15:27:00.815 hello[20293:903] Hello world!!
댓글 없음:
댓글 쓰기