Xcode 9.x 遇到 “Declaration of 'select' must be imported from module 'Darwin.POSIX.sys.time' before it is required” 错误?

Xcode 9.0中遇到一个错误是这样的:
Declaration of 'select' must be imported from module 'Darwin.POSIX.sys.time' before it is required
Xcode 9.x 遇到 “Declaration of 'select' must be imported from module 'Darwin.POSIX.sys.time' before it is required” 错误?_第1张图片
69F83F0BE7EDADB15AD4AD66B82FB0D4.png

解决方法:

在对应的类中添加头文件:"#include "

重新编译,通过!

就是这么简单。

你可能感兴趣的:(Xcode 9.x 遇到 “Declaration of 'select' must be imported from module 'Darwin.POSIX.sys.time' before it is required” 错误?)