在通常的C++ project 中能够经过定义宏 WIN32_LEAN_AND_MEAN 来解决,或者在#include <windows.h>以前加入#include <winsock2.h>windows
个人解决办法是在stdafx.h中code
#define WIN32_LEAN_AND_MEAN