Step 1. Create a simple console app in Xcode
Step 2. Create simple objective C class in same project
Step 3. Try to import like this:
#include <stdio.h>
#import "MyClass.h"
int main (int argc, const char * argv[])
{
// insert code here...
printf("Hello, World!\n");
return 0;
}
Why won’t this compile? Xcode error is “too many errors emitted stopping now”
Because your source file is a C module. Change the extension to .m. Better yet, start with the Foundation-based tool project template in Xcode.