$ cat helloworld.m
$ gcc -fconstant-string-class=NSConstantString -I /GNUstep/System/Library/Headers/ -c helloworld.m
bruce.lin.chn@lion ~
$ gcc -o helloworld helloworld.o -L /GNUStep/System/Library/Libraries/ -lobjc -
lgnustep-base
bruce.lin.chn@lion ~
$ ./helloworld.exe
2011-07-15 13:05:55.542 helloworld[4336] Hello World!
#import <Foundation/Foundation.h>
int main(int argc, const char* argv[])
{
NSAutoreleasePool *pool=[[NSAutoreleasePool alloc]init];
NSLog(@"Hello World!");
[pool drain];
return 0;
}
bruce.lin.chn@lion ~
$ gcc -fconstant-string-class=NSConstantString -I /GNUstep/System/Library/Headers/ -c helloworld.m
bruce.lin.chn@lion ~
$ gcc -o helloworld helloworld.o -L /GNUStep/System/Library/Libraries/ -lobjc -
lgnustep-base
bruce.lin.chn@lion ~
$ ./helloworld.exe
2011-07-15 13:05:55.542 helloworld[4336] Hello World!