more ios viewer errors
pjnolen
Member Posts: 152
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.
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
Thanks for your patience!
You shouldn't need to "fix" errors. At most you should only need to change the "iOS Deployment Target", and "Base SDK".
When i install the new version of xcode, it wouldn´t be compatible with my 4.1, am i right?
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
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.
---------------------------
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.
--------------------------------
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.