I made a new Console Application Project in XCode, and in the main.c file, I tried to Import Cocoa.h and another header file that I made. However, XCode started freaking out and gave me a bunch of errors. All of the errors were Parse Issues and came from NSObjCRuntime.h, NSZone.h, and NSObject.h. Anyone know why? Thanks!
Share
Because
.cis for C files;.mis for Objective-C files.By calling your file
main.c, you told Xcode to compile the file as C. As it includes Objective-C headers, it obviously meets parsing errors. Change the extension to.mand you’ll be fine.