1
我在斯威夫特框架使用sockaddr_dl這樣進口的「if_dl.h」:「u_char」的聲明必須從模塊「Darwin.POSIX.sys.types」需要在它之前進口
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 *}
}
}
現在我得到這個錯誤:
Declaration of 'u_char' must be imported from module 'Darwin.POSIX.sys.types' before it is required
我試圖在類代碼中添加「導入達爾文」,但它不能解決問題。