I built arm-apple-darwin-gcc with this tutorial:
http://wikee.iphwn.org/howto:toolchain_on_leopard_aspen

However I'm not able to compile sample application from "Iphone Open Application Development". I'm sure that the code is ok, but there must be something wrong with libraries? I tried the following line to compile:
Code:
arm-apple-darwin-gcc -o MyExample MyExample.m -lobjc \
    -framework CoreFoundation -framework Foundation -framework UIKit

Error Message (I've also included the code at the end of my post):
Code:
arm-apple-darwin-gcc -o MyExample MyExample.m -lobjc -framework CoreFoundation -framework Foundation -framework UIKit
/usr/local/bin/arm-apple-darwin-ld: warning multiple definitions of symbol _NSStreamDataWrittenToMemoryStreamKey
/usr/local/share/iphone-filesystem/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation(single module) definition of _NSStreamDataWrittenToMemoryStreamKey
/usr/local/share/iphone-filesystem/System/Library/Frameworks/Foundation.framework/Foundation(single module) definition of _NSStreamDataWrittenToMemoryStreamKey
/usr/local/bin/arm-apple-darwin-ld: warning multiple definitions of symbol _NSStreamFileCurrentOffsetKey
/usr/local/share/iphone-filesystem/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation(single module) definition of _NSStreamFileCurrentOffsetKey
/usr/local/share/iphone-filesystem/System/Library/Frameworks/Foundation.framework/Foundation(single module) definition of _NSStreamFileCurrentOffsetKey
/usr/local/bin/arm-apple-darwin-ld: warning multiple definitions of symbol _NSStreamSOCKSProxyConfigurationKey
/usr/local/share/iphone-filesystem/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation(single module) definition of _NSStreamSOCKSProxyConfigurationKey

...

/usr/local/bin/arm-apple-darwin-ld: warning multiple definitions of symbol _NSStreamSocketSecurityLevelTLSv1
/usr/local/share/iphone-filesystem/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation(single module) definition of _NSStreamSocketSecurityLevelTLSv1
/usr/local/share/iphone-filesystem/System/Library/Frameworks/Foundation.framework/Foundation(single module) definition of _NSStreamSocketSecurityLevelTLSv1
/usr/local/bin/arm-apple-darwin-ld: warning multiple definitions of symbol ___crashreporter_info__
/usr/local/share/iphone-filesystem/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation(single module) definition of ___crashreporter_info__
/usr/local/share/iphone-filesystem/System/Library/Frameworks/Foundation.framework/Foundation(single module) definition of ___crashreporter_info__
/usr/local/bin/arm-apple-darwin-ld: Undefined symbols:
.objc_class_name_NSAutoreleasePool
.objc_class_name_NSString
.objc_class_name_UIApplication
.objc_class_name_UIHardware
.objc_class_name_UIView
.objc_class_name_UIWindow
___adddf3vfp referenced from CoreFoundation expected to be defined in libgcc
___divdf3vfp referenced from CoreFoundation expected to be defined in libgcc
___eqdf2vfp referenced from CoreFoundation expected to be defined in libgcc
___eqsf2vfp referenced from CoreFoundation expected to be defined in libgcc
___extendsfdf2vfp referenced from CoreFoundation expected to be defined in libgcc
___fixdfsivfp referenced from CoreFoundation expected to be defined in libgcc
___fixsfsivfp referenced from CoreFoundation expected to be defined in libgcc
___fixunsdfsivfp referenced from CoreFoundation expected to be defined in libgcc
___fixunssfsivfp referenced from CoreFoundation expected to be defined in libgcc
___floatsidfvfp referenced from CoreFoundation expected to be defined in libgcc
___floatsisfvfp referenced from CoreFoundation expected to be defined in libgcc
___gedf2vfp referenced from CoreFoundation expected to be defined in libgcc
___gesf2vfp referenced from CoreFoundation expected to be defined in libgcc
___gtdf2vfp referenced from CoreFoundation expected to be defined in libgcc
___ledf2vfp referenced from CoreFoundation expected to be defined in libgcc
___lesf2vfp referenced from CoreFoundation expected to be defined in libgcc
___ltdf2vfp referenced from CoreFoundation expected to be defined in libgcc
___ltsf2vfp referenced from CoreFoundation expected to be defined in libgcc
___muldf3vfp referenced from CoreFoundation expected to be defined in libgcc
___mulsf3vfp referenced from CoreFoundation expected to be defined in libgcc
___nedf2vfp referenced from CoreFoundation expected to be defined in libgcc
___nesf2vfp referenced from CoreFoundation expected to be defined in libgcc
___subdf3vfp referenced from CoreFoundation expected to be defined in libgcc
___truncdfsf2vfp referenced from CoreFoundation expected to be defined in libgcc
___unorddf2vfp referenced from CoreFoundation expected to be defined in libgcc
___unordsf2vfp referenced from CoreFoundation expected to be defined in libgcc
___addsf3vfp referenced from Foundation expected to be defined in libgcc
___gtsf2vfp referenced from Foundation expected to be defined in libgcc
___subsf3vfp referenced from Foundation expected to be defined in libgcc
collect2: ld returned 1 exit status

MyExample.h
Code:
#import <CoreFoundation/CoreFoundation.h>
#import <UIKit/UIKit.h>

@interface MyApp : UIApplication
{
    UIWindow *window;
    UIView *mainView;
}
- (void)applicationDidFinishLaunching:
    (NSNotification *)aNotification;
@end
MyExample.m
Code:
#import "MyExample.h"

int main(int argc, char **argv)
{
    NSAutoreleasePool *autoreleasePool = [
        [ NSAutoreleasePool alloc ] init
    ];
    int returnCode = UIApplicationMain(argc, argv, [ MyApp class ]);
    [ autoreleasePool release ];
    return returnCode;
}

@implementation MyApp

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
    window = [ [ UIWindow alloc ] initWithContentRect:
        [ UIHardware fullScreenApplicationContentRect ]
    ];

    CGRect windowRect =
        [ UIHardware fullScreenApplicationContentRect ];
    windowRect.origin.x = windowRect.origin.y = 0.0f;

    mainView = [ [ UIView alloc ] initWithFrame: windowRect ];

    [ window setContentView: mainView ];
    [ window orderFront: self ];
    [ window makeKey: self ];
    [ window _setHidden: NO ];
}
@end
I've no idea what should be done to correct it. Could somebody help me?