一个Object C 经典的hello world例子,在XCode 11版本里,报错【'NSAutoreleasePool' is unavailable: not available in automatic reference counting mode】。
#import <Foundation/Foundation.h>
int main (int argc, const char * argv[])
{
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
NSLog (@"hello world");
[pool drain];
return 0;
}
解决方法,如下图: