Intento crear una subclase de MKAnnotationView para una aplicación de iPhone Mapkit, pero por alguna razón me encuentro de repente con este error:
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1
Estos son mi encabezado y los archivos principales del código que parece estar causando el error. Aunque el error no aparece específicamente para este archivo, no aparece si hago un comentario del archivo .m desde @implementation hasta @end. Sin embargo, aún aparece si comento todo en la implementación sin incluir la implementación @implementation.
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
Este es básicamente el mismo código que Xcode creó New File... > Objective-C Class > Subclass of: UIViewcon la subclase modificada.
Estoy en Snow Leopard ejecutando la versión 3.2.1 de Xcode.













