Reputation: 5654
I apparently changed something in an iPhone Xcode project, and now when it precompiles the headers I'm getting
In file included from [...] /Foundation.framework/Headers/Foundation.h:8,
from [...] /UIKit.framework/Headers/UIAccelerometer.h:8,
from [...] /UIKit.framework/Headers/UIKit.h:9:
/Developer/Platforms/[...]/NSObjCRuntime.h:146: error: stray '@' in program
/Developer/Platforms/[...]/NSObjCRuntime.h:146: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'NSString'
and then 5800 more errors...
I'm hoping somebody else did this to themselves recently and can point me in the right direction!
Upvotes: 0
Views: 1811
Reputation: 103
Click every file(e.g .c files) you have in the Xcode navigator. On the right panel, open the Identity and Type view and set the File Type to Objective-C source, this works for me.
Upvotes: 1
Reputation: 33
Just remove .something long../UIKit.h reference from you project settings for "Prefix Header", replace it with something from your previous projects.
Upvotes: 0
Reputation: 887225
As cdespinosa linked, you're compiling Objective-C as regular C++.
Go into the project settings and change the "Compile Sources As" to Objective-C++
Upvotes: 1
Reputation: 20799
GIYF:
http://forums.macrumors.com/archive/index.php/t-711554.html
Upvotes: 6