This is my first ever attempt at a Objective-c cocoa program, so I have no clue why it is giving me that error. I really don't understand the Build Result page either.
myClass.h
#import <Cocoa/Cocoa.h>
@interface myClass : NSObject {
int a;
int b;
}
-(void) setvara:(int)x;
-(void) setvarb:(int)y;
-(int) add;
@end
myClass.m
#import "myClass.h"
@implementation myClass
-(void)setvara:(int)x{
a=x;
}
-(void)setvarb:(int)y{
b=y;
}
-(int)add{
return a+b;
}
@end
main.m
#import <Cocoa/Cocoa.h>
#import <stdio.h>
#import "myClass.m"
int main(int argc, const char* argv[])
{
myClass* class = [[myClass alloc]init];
[class setvara:5];
[class setvarb:6];
printf("The sum: %d", [class add]);
[class release];
}