My educated guess would be the order of included headers, i.e. include winsock2.h first (with first meaning before windows.h), or define WIN32_LEAN_AND_MEAN before including windows.h, which prevents windows.h from including winsock v1.
#include
#include
-or-
#define WIN32_LEAN_AND_MEAN
#include
#include