mas-bandwidth / netcode

Secure client/server connections over UDP
BSD 3-Clause "New" or "Revised" License
2.44k stars 191 forks source link

MinGW linker error introduced in #66 #89

Closed Green-Sky closed 5 years ago

Green-Sky commented 5 years ago

I'm getting linker errors with MinGW for multiple definitions of inet_pton() and inet_ntop() because netcode.io exports those since #66. netcode.io should not export those.

A quick fix would be to declare those functions introduced in #66 static to stop them from leaking into the linker.

The more correct way, as pointed out in #65, would be to check for Windows feature level Vista or higher, and throw an error if not (#if _WIN32_WINNT < 0x0600), to ensure the functions are declared.

gafferongames commented 5 years ago

Cool, can you create a PR to fix this please?