On Sat, May 28, 2011 at 11:29 PM, Graham Cox <[email protected]> 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 protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to