Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

MatthewF

macrumors newbie
Original poster
Jun 27, 2010
21
0
I've made a dylib that contains the following code:
Code:
Test.h:

#import <Cocoa/Cocoa.h>
@interface Test : NSObject {
     int number;
}
-(void)beep;
-(void)giveInt:(int)num;
-(int)takeInt;

@end


Test.m:

#import "Test.h"

@implementation Test

-(void)beep {
     NSBeep();
}
-(void)giveInt:(int)num {
     number = num;
}
-(int)takeInt {
     return number;
}

@end

I've compiled the dylib and put it in another project but I can't seem to figure out how to make a Test object from the dylib and call some of the methods.
Anyone know how to do this?
Thanks,
Matt
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.