mas-bandwidth / netcode

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

fix #89 - MinGW linker error #90

Closed Green-Sky closed 5 years ago

Green-Sky commented 5 years ago

Making sure the Windows feature level is set to Vista or above.

The only question now is how to do the premake. Is it ok to just define _WIN32_WINNT there, in the if os.istarget "windows" then section?

defines { "_WIN32_WINNT=0x0600" }
gafferongames commented 5 years ago

I'm not sure. This approach seems like it may have side effects. is there another way of doing this?

nxrighthere commented 5 years ago

If you want to remove implementation instead of hiding it, then

if (MSYS OR MINGW)
    add_definitions(-DWINVER=0x0601)
    add_definitions(-D_WIN32_WINNT=0x0601)
endif()

should be added to CMake.

gafferongames commented 5 years ago

We use premake5?

nxrighthere commented 5 years ago

Ah, yes, I completely forgot that I converted it to CMake a while ago, locally. 😄

Green-Sky commented 5 years ago

This approach seems like it may have side effects.

Thats why I'm asking.

... I converted it to CMake a while ago, locally.

Same here.

Is there no way to tell in premake, if we are building with MinGW?

nxrighthere commented 5 years ago

Well, it's okay to use these macros (I'm using them in another networking library). I don't think that someone cares about the support of Windows Server 2003, so...

Not familiar with the premake, sorry, can't help with that.

gafferongames commented 5 years ago

Happy to accept a PR from anybody who can test it. I dev on Mac, so I can't. Closing the PR until then. cheers all -- Glenn