【发布时间】:2016-12-26 10:48:28
【问题描述】:
我在我的 Swift 框架中导入了“if_dl.h”,以便像这样使用 sockaddr_dl:
module net [system] [extern_c] {
module if_dl {
umbrella header
"/Applications/Xcode_7.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/net/if_dl.h"
module * {export *}
}
}
现在我收到了这个错误:
'u_char' 的声明必须从模块中导入 'Darwin.POSIX.sys.types' 之前是必需的
我尝试在类代码中添加“import Darwin”,但没有解决问题。
【问题讨论】:
标签: ios swift frameworks