Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Conflict with WINVER on Windows 10 x64 #34

Open
DJuego opened this issue Nov 1, 2021 · 3 comments
Open

Conflict with WINVER on Windows 10 x64 #34

DJuego opened this issue Nov 1, 2021 · 3 comments

Comments

@DJuego
Copy link

DJuego commented Nov 1, 2021

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

@Lichtso
Copy link
Owner

Lichtso commented Nov 2, 2021

Maybe related: #18 (comment)

Can you try replacing #ifdef WINVER by #ifdef _WIN32_WINNT?

@DJuego
Copy link
Author

DJuego commented Nov 2, 2021

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

@Lichtso
Copy link
Owner

Lichtso commented Nov 3, 2021

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?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants