toolchain+cygwin 를 이용해서 ipod touch 프로그래밍이 가능하다.
이번에 포멧을 한김에 툴들을 설치해서 helloWorld~ 를 한번 구경해봤다...

간단하게 설치가 끝난후, 소스를 작성한다.

main.m
---------------------
#import <UIKit/UIKit.h>
#import "HelloWorld.h"

int main(int argc, char *argv[]) {
    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
    int ret = UIApplicationMain(argc, argv, [HelloWorld class]);
    [pool release];
    return ret;
}
--------------------
HelloWorld.h
------------------------
#import <UIKit/UIKit.h>

@interface HelloWorld : UIApplication {
}
@end
--------------------
HelloWorld.m
----------------------
#import "HelloWorld.h"
@implementation HelloWorld

- (void) applicationDidFinishLaunching: (id) unused {  

    CGRect  screenRect;
    screenRect = [UIHardware fullScreenApplicationContentRect];
   

    UIWindow*   window;
    window = [[UIWindow alloc] initWithContentRect:screenRect];
   

    UITextView* textView = [[UITextView alloc] initWithFrame:[window bounds]];
    [textView setText:@"Hello World?"];
   

    [window setContentView:textView];


    [window orderFront:self];
    [window makeKey:self];
    [window _setHidden:NO];
}
@end
-----------------
이 소스들을 컴파일 해준다.

arm-apple-darwin-gcc -c -Wall -pipe -ansi -O3 main.m -o main.o
arm-apple-darwin-gcc -c -Wall -pipe -ansi -O3 helloWorld.m -o helloWorld.o
arm-apple-darwin-gcc -lobjc -framework CoreFoundation -framework Foundation -framework UIKit -framework LayerKit -framework CoreGraphics -o helloWorld main.o helloWorld.o

이러면 helloWorld 파일이 만들어 진다...

사용자 삽입 이미지

실행한 화면...

사용자 삽입 이미지


Posted by 후니 유

댓글을 달아주세요:: 스팸은 정중히 사절합니다.

  1. 2008/03/26 11:56
    댓글 주소 수정/삭제 댓글
    RSS로만 읽다가 오늘은 ON20을 타고 들어왔습니다. 반가운 이름이 보여서요. 요즘 바이러스로 고생을 하신듯 하던데 확 밀어버리시지.
    잡지 나오면 스냅샷 올려주세요. 직접 펴서 보진 못해도 눈팅이라도 하게^^
    • 2008/03/26 12:26
      댓글 주소 수정/삭제
      BoBo님 오랜만이네요 ^^
      드디어 잡긴 잡았네요... 질긴 바이러스~~
      잡지 나오면 제가 한번 올리죠 ^^
      창간준비호에 실리기도 했답니다 홓~~


BLOG main image
Cr4cK th3 W0Rld by 후니 유

1,214,105


Today : 142
Yesterday : 177
hit counters

카테고리

전체보기 (802)
Etc (246)
Hacked Brain (280)
My Project (32)
데일리 (22)
운영체제 (31)
프로그래밍 (92)
Securities (27)