netLink
netLink copied to clipboard
Conflict with WINVER on Windows 10 x64
Hi @Lichtso! It's been a long time! I still use your library! Thanks for this!! I am working in Microsoft Visual Studio 2019 environment. WINVER does not seem to work. I need it for conditional compilation:
#ifdef WINVER
#include <SDKDDKVer.h>
#include <Ws2tcpip.h>
#pragma comment(lib, "Ws2_32.lib")
#undef min
#undef max
#else
I get:
#error: WINVER setting conflicts with _WIN32_WINNT setting
DJuego
Maybe related: https://github.com/Lichtso/netLink/issues/18#issuecomment-239233412
Can you try replacing #ifdef WINVER
by #ifdef _WIN32_WINNT
?
Thank you for your swift answer!
Unfortunately it does not work.
fatal error C1083: Cannot open include file: 'arpa/inet.h': No such file or directory
DJuego
I mean you can always force it by replacing #ifdef WINVER
by #ifdef true
.
But, it would be nice to find a macro like WINVER
or _WIN32_WINNT
which is automatically set on windows environments. Can you check in your IDE or CMake what macros it defines?