在我的头文件GuiController.h中:
#import <Cocoa/Cocoa.h>
#import <APPKit/NSTextField.h>
#import "ClientSocket.h"
#import "UploaderThread.h"
#import "DownloaderThread.h"
/**
* SER 321 Foundations of Distributed Applications
* see http://pooh.poly.asu.edu/Cst420
* @author Christopher Sosa (smoothpinkjazz@gmail.com), ASU Polytechnic, Software Engineering
* @version December 2012
*/
@class AppDelegate; //compiler error
@interface GuiController : NSObject {
AppDelegate * appDelegate;
NSSound *sound;
NSString *port;
NSString *host;
ClientSocket *mainSock;
ClientSocket *songSock;
UploaderThread *uploader;
int ident;
NSTextField *albTB;
NSComboBox *titCB;
NSTextField *authTB;
}
- (id) initWithDelegate: (AppDelegate*) theDelegate
host: (NSString*) hostName
port: (NSString*) portNum;
- (void) dealloc;
- (void) saveLib;
- (void) restoreLib;
- (void) addMD;
- (void) removeMD;
- (void) refreshMD;
- (void) playMD;
- (void) comboBoxSelectionDidChange: (NSNotification*)notification;
- (void) debug: (NSString*) aMessage;
@end
我标记了引发错误的行,即使看起来没有错误。我99%肯定编译器抛出错误只是因为感觉就像它。你能弄明白这个问题吗?
答案 0 :(得分:2)
检查您的DownloaderThread.h
文件。你可能在结尾处有一个错误。
或者,从未编译为Obj-C或Obj-C ++的源文件导入GuiController.h
。虽然如果是这种情况我会期待更快的错误(在其中一个导入的标题中)。