syntax error before ‘AT_NAME’ token
If you happen to be using Xcode and get this somewhat baffling error message when building:
syntax error before ‘AT_NAME’ token
The problem is that you are missing an @end in some file that you’ve #imported, probably a header file. This error also shows up as “parse error ...” in some versions of Xcode (took me a while to track down with Google as a result).
Thanks you saved me some pain! I’ve new to Xcode and its great to have practical tips like this recorded somewhere.
December 8, 2007 @ 10:20 pm
It could be caused by something niggly like this!
- (CGRect)xyz // <- no ; !
@end
December 16, 2007 @ 9:33 am
Since that last comment isn’t very clear, and I just had to figure it out for myself…
This error can also happen if you miss out a semicolon before a @whatever expression.
For example
…
- (void)draw;
- (void)startRotate // note missing semicolon
@end
July 23, 2008 @ 5:13 pm