I have an Xcode project for my Cocoa application. It’s all Objective-C so far.
Problems started after I added a new .c File from the menu (Add C file and header): test.c and header test.h.
When I try to compile the project now there are thousands of errors. All of them are complaints about syntax errors. For example:
NSObjCRuntime.h: Expected identifier or '(' before '@' token
Both new files, test.c and test.h, do not contain any code, only the default header comments. Something must be really broken with my project configuration. When I remove these two files the project compiles just fine.
The project language is set to C99. Is there anything else I could check?
Thanks,
Mark
if the files you compile include nothing, then your problem is likely in the prefix header (extension: pch)
so you just wrap your library includes based on the language (in the pch):