Reference to 'Point' is ambiguous. Unknown type name 'NSString'.

问题: 导入头文件的时候报错

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.2.sdk/usr/include/MacTypes.h:542:16: Reference to 'Point' is ambiguous

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:503:1: Expected unqualified-id

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:505:9: Unknown type name 'NSString'

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:519:53: Format argument not an NSString

解决: 导入头文件的时候加入宏定义判断

#ifdef __OBJC__

#import

#endif

你可能感兴趣的:(Reference to 'Point' is ambiguous. Unknown type name 'NSString'.)