Problem with missing symbol
Problem with missing symbol
- Subject: Problem with missing symbol
- From: Emmanuel Pinault <email@hidden>
- Date: Thu, 10 Dec 2009 09:46:40 -0800
Hi,
I am trying for some specific reason to access a private attribute and make it public for my need with the following code
in the .h
#import <Cocoa/Cocoa.h>
@interface NSStatusItem (hack)
- (NSRect)hackFrame;
@end
in the .m
import "NSStatusItem+hack.h"
@implementation NSStatusItem(hack)
- (NSRect)hackFrame
{
return [_fWindow frame];
}
@end
void Init_nsstatusitem() { }
When compiling with the following I get
gcc-4.2 -o NSStatusItem.bundle -bundle -framework AppKit NSStatusItem+hack.m
Undefined symbols:
"_OBJC_IVAR_$_NSStatusItem._fWindow", referenced from:
-[NSStatusItem(hack) hackFrame] in ccGpP6n1.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
This use to work in 10.5 .. I am using 10.6 and this is not linking due to missing symbol. What I do not get, is that the _fWindow is still an attribute in the NSSStatusItem...
any idea?
Thanks
Emmanuel_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden