more ios viewer errors

pjnolenpjnolen Member Posts: 152
edited November -1 in Tech Support
I was getting 3 errors. I updated xCode, iphone simulator, GS and GS viewer.

I deleted all the apps that i had on the simulator completely, and recompiled the new GS viewer.

fixed the first 2 errors, but still getting this one. Makes you want to tear out your face.

Undefined symbols:
"_OBJC_CLASS_$_GSAccountController", referenced from:
objc-class-ref-to-GSAccountController in libGameSaladViewer.a(MainViewController.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status

Any ideas to fix it i haven't tried?

I bought an original iphone, and a ipod 4 to test it on. I can't imagine not getting it to work.

Comments

  • JillSaladJillSalad Inactive, Chef Emeritus Posts: 43
    This has been passed along to our CS team.

    Thanks for your patience!
  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
    It would probably be best to use iOS SDK 4.2 for the Xcode version instead of the beta.

    You shouldn't need to "fix" errors. At most you should only need to change the "iOS Deployment Target", and "Base SDK".
  • MOVProductionsMOVProductions Member Posts: 53
    Yes I am also having the same problem so should I download the new version of Xcode?
  • ForcingForcing Member Posts: 93
    I too, what to do now??

    When i install the new version of xcode, it wouldn´t be compatible with my 4.1, am i right?
  • pjnolenpjnolen Member Posts: 152
    CodeMonkey, I'm using SDK 4.2.

    To make sure i just didn't do something wrong on my computer, i went to my wife's machine, a core 2 duo macbook pro which only has the OS installed, and all she does is use facebook and check her email. I downloaded SDK 4.2, and GS 0.9.1 and the viewer.

    Installed them, and ran the viewer in xCode.

    I got the same exact error as i did on my computer.

    Undefined symbols:
    "_OBJC_CLASS_$_GSAccountController", referenced from:
    objc-class-ref-to-GSAccountController in libGameSaladViewer.a(MainViewController.o)
    ld: symbol(s) not found
    collect2: ld returned 1 exit status

    I didn't get this error prior to 0.9.1
  • pjnolenpjnolen Member Posts: 152
    "You shouldn't need to "fix" errors. At most you should only need to change the "iOS Deployment Target", and "Base SDK"."

    Right now my "Base SDK" is set to iOS 4.2(my only choice).

    My "iOS Deployment Target" is 3.0
    I've tried other targets including 3.1.3 and 4.2 but I still get the same error.

    It seems like it would be simple, like I would 'find' the symbol for the GS Account Controller because it can't find it.
  • pjnolenpjnolen Member Posts: 152
    I did a google search and found a guy that had a similar issue with the project he was working on(unassociated with GS). It might or might not help you guys but i thought i'd share if it did.

    ---------------------------
    I just encountered the same linker error. I discovered through trial and error that it was because I was invoking isKindOfClass. I'm not sure why this causes the linker to barf, but hopefully this information helps out.

    The class in question, OrderItem, is a child of NSManagedObject; in other words, it's an automatically-generated Core Data entity class.

    Specifically, here was the linker error:

    "_OBJC_CLASS_$_OrderItem", referenced from:
    objc-class-ref-to-OrderItem in libmyStaticLib.a(MyTableViewController.o)
    ld: symbol(s) not found
    collect2: ld returned 1 exit status
    -----
    And here was the offending code:

    - (void)handleButtonTapWithObject:(id)object
    {
    // This must be an OrderItem or else we don't want to touch it:
    if ( NO == [object isKindOfClass:[OrderItem class]] ) // <-- OFFENDING CODE
    {
    NSLog(@Object parameter is of unexpected type.);
    return;
    }
    My workaround was simply to omit the test that ensures 'object' is an OrderItem. The code is not as secure without this test, but the linker error went away. I'd be curious to know if I am going about this test wrong, and perhaps there is a better way of doing this.
    --------------------------------
  • pjnolenpjnolen Member Posts: 152
    ok, figured it out.

    The error is only generated when compiling for the iOS Simulator from xCode. It compiled fine for the iphone 2g and the ipod 4.

    But as I have the 2 pieces of hardware to test it on now, i won't have to use the Simulator anymore.
Sign In or Register to comment.