• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: What's wrong with this?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >What's wrong with this? (From: Graham Cox <email@hidden>)

  • Prev by Date: [IGNORE} Re: What's wrong with this?
  • Next by Date: Re: UIColor vs. NSColor methods
  • Previous by thread: [IGNORE} Re: What's wrong with this?
  • Next by thread: How can logging a pointer value cause EXC_BAD_ACCESS?
  • Index(es):
    • Date
    • Thread