iPhone Open Application Development
iPhone Open Application Development, Second Edition Write Native Applications Using the Open Source Tool Chain By Jonathan Zdziarski
October 2008
Pages: 268


Welcome Guest ( Log In | Register )

Arm-apple-darwin-gcc - Problem With Libraries?
martuskah
post Aug 11 2008, 04:32 AM
Post #1


New Member
*

Group: Members
Posts: 1
Joined: 11-August 08
Member No.: 567



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?
Go to the top of the page
 
+Quote Post
 
Start new topic
Replies (1 - 1)
solidsven
post Jan 2 2009, 07:02 PM
Post #2


New Member
*

Group: Members
Posts: 1
Joined: 2-January 09
Member No.: 1,888



Did anyone ever solve this problem? I have the same issue going on. Working on it. Will post answers once I figure it out.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

RSS Lo-Fi Version Time is now: 22nd November 2009 - 04:20 PM