Open mdparker opened 3 years ago
Okay, I see there's already a pragma in package.d. However, when compiling the example from the readme on Windows, I did see those missing symbol errors and had to link the example with winsock.
We see linker errors too because of this. The pragma seems to be in the wrong module - if that package.d
object file isn't pulled in (from the static lib), the embedded linker directive isn't used. I suggest moving it to dub.json
, or better yet, getting rid of the manual endianness conversions (using ntohs
and ntohl
from winsock2) via std.bitmanip.nativeToBigEndian()
etc.
common.d imports
core.sys.windows.winsock2
, but the dub recipe does not require the winsock library, causing linker errors for missingntohl
andntohs
. Perhaps apragma(lib, "Ws2_32")
in the Windows version block at the top of common.d?