मैं एक iPhone MapKit अनुप्रयोग के लिए MKAnnotationView का एक उपवर्ग बनाने के लिए कोशिश कर रहा हूँ, लेकिन किसी कारण से मैं अचानक इस त्रुटि का सामना कर रहा हूँ:
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1
ये मेरी शीर्ष लेख और कोड है कि त्रुटि पैदा किया जा रहा है के लिए मुख्य फ़ाइलें हैं। हालांकि त्रुटि विशेष रूप से इस फ़ाइल के लिए दिखाई नहीं देता है, यह अगर मैं @implementation से मीटर फ़ाइल बाहर टिप्पणी @end प्रतीत नहीं होता है। यह अभी भी मैं @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
यह मूल रूप से एक ही कोड के माध्यम से बनाया Xcode वह यह है कि New File... > Objective-C Class > Subclass of: UIViewउपवर्ग के साथ बदल दिया है।
मैं पर Snow Leopard Xcode के संस्करण 3.2.1 चल रहा हूँ।













