Closed
Description
Just including the header won't always work on Windows, resulting in tons of errors of the kind (around 1810 errors in my case):
Error C2446 '!=': no conversion from 'long' to 'int (__cdecl *)(void)'
Error C2027 use of undefined type 'fd_set'
Error C2375 'WSAAsyncGetServByName': redefinition; different linkage
...
The fix is to include Winsock2.h first (before Windows.h) or include Windows.h by defining WIN32_LEAN_AND_MEAN beforehand:
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
Might be good to mention this somewhere since otherwise it's not as easy as simply including the header and get going because of this.
Metadata
Metadata
Assignees
Labels
No labels