Monday, April 18, 2011

iphone error: expected '=', ',', ';', 'asm' or '__attribute__' before error

Noted that this error happened only for the NSString*, for e.g.,
  • extern double const kTimeout; // fine
  • extern NSString* const kImageType; // compile error
After the above analysis & little break, eventually the problem is resolved by adding the the following import to the .h - "Foundation/Foundation.h"

Source:http://stackoverflow.com/questions/990906/iphone-error-expected-asm-or-attribute-before-foo

No comments: