I'm trying to create a subclass of MKAnnotationView for an iPhone Mapkit app, but for some reason I am suddenly encountering this error:
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1
These are my header and main files for the code that seems to be causing the error. Though the error does not show up for this file specifically, it does not appear if I comment out the .m file from @implementation to @end. It does still appear if I comment everything in the implementation not including the @implementation itself, however.
PhotoAnnotationView.h
#import <UIKit/UIKit.h>
#import <MapKit/MapKit.h>
@interface PhotoAnnotationView : MKAnnotationView {
UIImageView *thumb;
}
@property (nonatomic, retain) IBOutlet UIImageView *thumb;
@end
PhotoAnnotationView.m
#import "PhotoAnnotationView.h"
@implementation PhotoAnnotationView
@synthesize thumb;
- (id)initWithFrame:(CGRect)frame {
if (self = [super initWithFrame:frame]) {
// Initialization code
}
return self;
}
- (void)drawRect:(CGRect)rect {
// Drawing code
}
- (void)dealloc {
[super dealloc];
}
@end
This is basically the same code that Xcode created via New File... > Objective-C Class > Subclass of: UIView
with the subclass changed.
I'm on Snow Leopard running version 3.2.1 of Xcode.