[futurebasic] Re: [FB] Change cursor by bundle image

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : June 2011 : Group Archive : Group : All Groups

From: Robert Purves <listrp@...>
Date: Sun, 5 Jun 2011 10:10:36 +1200
Yoshiyuki Hasegawa wrote:

> However, the following errors occur if it transplants it to my program.
> 
> Error: gcc:ld: duplicate symbol _ChangeCursor in _3_ChangeCursor.o and _2_Subs_Help_Tags.incl...ChangeCursor.o for architecture ppc
> Error: gcc:ld: duplicate symbol _ChangeCursor in _3_ChangeCursor.o and _2_Subs_Help_Tags.incl...ChangeCursor.o for architecture i386
> Error: Compilation failed



...
BeginCDeclaration
void ChangeCursor( CFStringRef name );
EndC

BeginCFunction
void ChangeCursor( CFStringRef name )
{
    NSCursor *cursor = [[NSCursor alloc] initWithImage:[NSImage imageNamed:(NSString *)name] hotSpot:NSMakePoint( 6, 6 )];
    [cursor set];
    [cursor release];
}
EndC

toolbox ChangeCursor( CFStringRef name )
...


Robert P.