论坛首页 移动开发技术论坛

Objective-C on Windows via GNUStep

浏览 2081 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2011-07-15  
iOS


$ cat helloworld.m
#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!
论坛首页 移动开发技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics