Re: What's wrong with this?
Re: What's wrong with this?
- Subject: Re: What's wrong with this?
- From: "Stephen J. Butler" <email@hidden>
- Date: Sat, 28 May 2011 23:39:38 -0500
On Sat, May 28, 2011 at 11:29 PM, Graham Cox <email@hidden> wrote:
> #import <UIKit/UIKit.h>
>
> @class SGBoard; //<------ error: Expected '{' before 'class'
>
> @interface GameViewController : UIViewController
> {
> IBOutlet UIView* mGameView;
> IBOutlet SGBoard* mBoard;
> }
>
>
> - (SGBoard*) board;
>
> @end
>
>
>
> This is occurring on one header file out of many which have exactly the same import and forward class declaration, but this one just won't compile. I've tried deleting the text and starting over in case it was a rogue hidden character, but to no avail. What's going on here?
Header files don't get compiled. They get included into source files
which then get compiled. What's the name of the source file that
includes this when you get the error? Does it have an .m or .mm
extension? What file is included just before this one? Because of how
files get included sometimes an error in a previous header file can
manifest in a subsequent header (such as a missing '}' or ';')
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden