"syntax error before '@' token" on NSDictionary in command-line utility
"syntax error before '@' token".
Here's the code:
#import <Foundation/Foundation.h>
int main (int argc, const char * argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:@”red”, @”color1”, nil];
[pool drain];
return 0;
}
The NSDictionary code is identical to example code provided in the XCode docs, and to other code snippets I've found on the web. So, I'm pretty confident that it's not a code problem...
Maybe it's my setup in XCode??
XCode version: 3.1.4
SDK: Mac OSX 10.5 (SDK Base)
Active Configuration: Debug
Under "Targets" > "Link Binary With Libraries" > Foundation.framework > Headers (includes NSDictionary.h)
I downloaded the iPhone SDK (I'm learning iPhone development). Could it be that I can't compile to Mac OSX with a command-line utility with just the iPhone SDK?
Any other ideas?
Thanks in advance!
Mac OS X (10.5)