Hot Sauce79
Jul 10, 2008, 08:57 AM
Here is the error that is given.
Undefined symbols:
".objc_class_name_PlacardView", referenced from:
literal-pointer@__OBJC@__cls_refs@PlacardView in MoveMe2View.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
Here is the code (MoveMe2View.m) that contains the error.
#import "MoveMe2View.h"
#import "PlacardView.h"
@implementation MoveMe2View
@synthesize placardView;
- (id)initWithCoder: (NSCoder *)coder {
if (self = [self initWithCoder:coder]) {
[self setUpPlacardView];
}
return self;
}
- (void)setUpPlacardView {
PlacardView *aView = [[PlacardView alloc] init]; //I tracked the error
self.placardView = aView; //down to these three
[aView release]; //lines of code
placardView.center = self.center;
[self addSubview: placardView];
}
- (void)dealloc {
[placardView release];
[super dealloc];
}
@end
Here is the PlacardView.h
#import <UIKit/UIKit.h>
@interface PlacardView : UIView {
UIImage *placardImage;
}
@property (nonatomic, retain) UIImage *placardImage;
@end
Any and all help will be greatly appreciated. Thank you.
Undefined symbols:
".objc_class_name_PlacardView", referenced from:
literal-pointer@__OBJC@__cls_refs@PlacardView in MoveMe2View.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
Here is the code (MoveMe2View.m) that contains the error.
#import "MoveMe2View.h"
#import "PlacardView.h"
@implementation MoveMe2View
@synthesize placardView;
- (id)initWithCoder: (NSCoder *)coder {
if (self = [self initWithCoder:coder]) {
[self setUpPlacardView];
}
return self;
}
- (void)setUpPlacardView {
PlacardView *aView = [[PlacardView alloc] init]; //I tracked the error
self.placardView = aView; //down to these three
[aView release]; //lines of code
placardView.center = self.center;
[self addSubview: placardView];
}
- (void)dealloc {
[placardView release];
[super dealloc];
}
@end
Here is the PlacardView.h
#import <UIKit/UIKit.h>
@interface PlacardView : UIView {
UIImage *placardImage;
}
@property (nonatomic, retain) UIImage *placardImage;
@end
Any and all help will be greatly appreciated. Thank you.
