ICE和LIBEVENT同用的时候会出现一大堆重定义错误的解决办法

时间:2020-12-15 00:17:00

这几天在WINDOWS下用ICE和LIBEVENT来做网络程序,编译的时候出现一大堆莫名其妙的错误如下:

1>  XPlayDecode.cpp
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\ws2def.h(91): warning C4005: “AF_IPX”: 宏重定义
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(460) : 参见“AF_IPX”的前一个定义
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\ws2def.h(131): warning C4005: “AF_MAX”: 宏重定义
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(479) : 参见“AF_MAX”的前一个定义
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\ws2def.h(168): warning C4005: “SO_DONTLINGER”: 宏重定义
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(402) : 参见“SO_DONTLINGER”的前一个定义
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\ws2def.h(212): error C2011: “sockaddr”:“struct”类型重定义
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(485) : 参见“sockaddr”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\ws2def.h(390): error C2059: 语法错误:“常量”
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\ws2def.h(390): error C3805: “常量”: 意外标记,应输入“}”或者“,”
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\ws2def.h(524): warning C4005: “IN_CLASSA”: 宏重定义
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(287) : 参见“IN_CLASSA”的前一个定义
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\ws2def.h(530): warning C4005: “IN_CLASSB”: 宏重定义
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(293) : 参见“IN_CLASSB”的前一个定义
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\ws2def.h(536): warning C4005: “IN_CLASSC”: 宏重定义
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(299) : 参见“IN_CLASSC”的前一个定义
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\ws2def.h(547): warning C4005: “INADDR_ANY”: 宏重定义
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(304) : 参见“INADDR_ANY”的前一个定义
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\ws2def.h(549): warning C4005: “INADDR_BROADCAST”: 宏重定义
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(306) : 参见“INADDR_BROADCAST”的前一个定义
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\ws2def.h(583): error C2011: “sockaddr_in”:“struct”类型重定义
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(312) : 参见“sockaddr_in”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(132): error C2011: “fd_set”:“struct”类型重定义
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(68) : 参见“fd_set”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(167): warning C4005: “FD_SET”: 宏重定义
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(102) : 参见“FD_SET”的前一个定义
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(176): error C2011: “timeval”:“struct”类型重定义
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(111) : 参见“timeval”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(232): error C2011: “hostent”:“struct”类型重定义
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(167) : 参见“hostent”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(245): error C2011: “netent”:“struct”类型重定义
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(180) : 参见“netent”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(252): error C2011: “servent”:“struct”类型重定义
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(187) : 参见“servent”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(264): error C2011: “protoent”:“struct”类型重定义
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(199) : 参见“protoent”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(360): error C2011: “WSAData”:“struct”类型重定义
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(322) : 参见“WSAData”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(458): error C2011: “sockproto”:“struct”类型重定义
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(494) : 参见“sockproto”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(500): error C2011: “linger”:“struct”类型重定义
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(531) : 参见“linger”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(513): warning C4005: “SOMAXCONN”: 宏重定义
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(544) : 参见“SOMAXCONN”的前一个定义
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(542): warning C4005: “FD_READ”: 宏重定义
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(562) : 参见“FD_READ”的前一个定义
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(545): warning C4005: “FD_WRITE”: 宏重定义
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(563) : 参见“FD_WRITE”的前一个定义
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(548): warning C4005: “FD_OOB”: 宏重定义
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(564) : 参见“FD_OOB”的前一个定义
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(551): warning C4005: “FD_ACCEPT”: 宏重定义
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(565) : 参见“FD_ACCEPT”的前一个定义
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(554): warning C4005: “FD_CONNECT”: 宏重定义
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(566) : 参见“FD_CONNECT”的前一个定义
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(557): warning C4005: “FD_CLOSE”: 宏重定义
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(567) : 参见“FD_CLOSE”的前一个定义
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(1578): error C2375: “accept”: 重定义;不同的链接
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(742) : 参见“accept”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(1600): error C2375: “bind”: 重定义;不同的链接
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(747) : 参见“bind”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(1619): error C2375: “closesocket”: 重定义;不同的链接
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(752) : 参见“closesocket”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(1638): error C2375: “connect”: 重定义;不同的链接
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(754) : 参见“connect”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(1659): error C2375: “ioctlsocket”: 重定义;不同的链接
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(759) : 参见“ioctlsocket”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(1680): error C2375: “getpeername”: 重定义;不同的链接
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(764) : 参见“getpeername”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(1701): error C2375: “getsockname”: 重定义;不同的链接
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(769) : 参见“getsockname”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(1724): error C2375: “getsockopt”: 重定义;不同的链接
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(774) : 参见“getsockopt”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(1745): error C2375: “htonl”: 重定义;不同的链接
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(781) : 参见“htonl”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(1762): error C2375: “htons”: 重定义;不同的链接
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(783) : 参见“htons”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(1780): error C2375: “inet_addr”: 重定义;不同的链接
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(785) : 参见“inet_addr”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(1797): error C2375: “inet_ntoa”: 重定义;不同的链接
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(787) : 参见“inet_ntoa”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(1815): error C2375: “listen”: 重定义;不同的链接
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(789) : 参见“listen”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(1833): error C2375: “ntohl”: 重定义;不同的链接
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(793) : 参见“ntohl”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(1850): error C2375: “ntohs”: 重定义;不同的链接
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(795) : 参见“ntohs”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(1870): error C2375: “recv”: 重定义;不同的链接
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(797) : 参见“recv”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(1895): error C2375: “recvfrom”: 重定义;不同的链接
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(803) : 参见“recvfrom”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(1921): error C2375: “select”: 重定义;不同的链接
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(811) : 参见“select”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(1945): error C2375: “send”: 重定义;不同的链接
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(818) : 参见“send”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(1970): error C2375: “sendto”: 重定义;不同的链接
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(824) : 参见“sendto”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(1996): error C2375: “setsockopt”: 重定义;不同的链接
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(832) : 参见“setsockopt”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(2018): error C2375: “shutdown”: 重定义;不同的链接
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(839) : 参见“shutdown”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(2039): error C2375: “socket”: 重定义;不同的链接
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(843) : 参见“socket”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(2063): error C2375: “gethostbyaddr”: 重定义;不同的链接
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(850) : 参见“gethostbyaddr”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(2083): error C2375: “gethostbyname”: 重定义;不同的链接
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(855) : 参见“gethostbyname”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(2101): error C2375: “gethostname”: 重定义;不同的链接
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(857) : 参见“gethostname”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(2121): error C2375: “getservbyport”: 重定义;不同的链接
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(861) : 参见“getservbyport”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(2141): error C2375: “getservbyname”: 重定义;不同的链接
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(865) : 参见“getservbyname”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(2160): error C2375: “getprotobynumber”: 重定义;不同的链接
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(869) : 参见“getprotobynumber”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(2178): error C2375: “getprotobyname”: 重定义;不同的链接
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(871) : 参见“getprotobyname”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(2200): error C2375: “WSAStartup”: 重定义;不同的链接
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(875) : 参见“WSAStartup”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(2219): error C2375: “WSACleanup”: 重定义;不同的链接
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(879) : 参见“WSACleanup”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(2236): error C2375: “WSASetLastError”: 重定义;不同的链接
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(881) : 参见“WSASetLastError”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(2253): error C2375: “WSAGetLastError”: 重定义;不同的链接
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(883) : 参见“WSAGetLastError”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(2270): error C2375: “WSAIsBlocking”: 重定义;不同的链接
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(885) : 参见“WSAIsBlocking”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(2287): error C2375: “WSAUnhookBlockingHook”: 重定义;不同的链接
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(887) : 参见“WSAUnhookBlockingHook”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(2304): error C2375: “WSASetBlockingHook”: 重定义;不同的链接
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(889) : 参见“WSASetBlockingHook”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(2321): error C2375: “WSACancelBlockingCall”: 重定义;不同的链接
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(891) : 参见“WSACancelBlockingCall”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(2343): error C2375: “WSAAsyncGetServByName”: 重定义;不同的链接
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(893) : 参见“WSAAsyncGetServByName”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(2370): error C2375: “WSAAsyncGetServByPort”: 重定义;不同的链接
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(901) : 参见“WSAAsyncGetServByPort”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(2396): error C2375: “WSAAsyncGetProtoByName”: 重定义;不同的链接
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(909) : 参见“WSAAsyncGetProtoByName”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(2421): error C2375: “WSAAsyncGetProtoByNumber”: 重定义;不同的链接
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(916) : 参见“WSAAsyncGetProtoByNumber”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(2446): error C2375: “WSAAsyncGetHostByName”: 重定义;不同的链接
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(923) : 参见“WSAAsyncGetHostByName”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(2473): error C2375: “WSAAsyncGetHostByAddr”: 重定义;不同的链接
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(930) : 参见“WSAAsyncGetHostByAddr”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(2496): error C2375: “WSACancelAsyncRequest”: 重定义;不同的链接
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(939) : 参见“WSACancelAsyncRequest”的声明
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock2.h(2517): error C2375: “WSAAsyncSelect”: 重定义;不同的链接
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(941) : 参见“WSAAsyncSelect”的声明
1>XPlayDecode.cpp(62): error C2079: “wsa_data”使用未定义的 struct“WSAData”
1>XPlayDecode.cpp(63): error C3861: “WSAStartup”: 找不到标识符
1>XPlayDecode.cpp(66): error C2079: “sin”使用未定义的 struct“sockaddr_in”
1>XPlayDecode.cpp(70): error C2228: “.sin_family”的左边必须有类/结构/联合
1>          类型是“int”
1>XPlayDecode.cpp(71): error C2228: “.sin_port”的左边必须有类/结构/联合
1>          类型是“int”
1>XPlayDecode.cpp(71): error C3861: “htons”: 找不到标识符
1>XPlayDecode.cpp(77): error C3861: “socket”: 找不到标识符
1>XPlayDecode.cpp(77): error C2440: “初始化”: 无法从“SOCKET (__stdcall *)(int,int,int)”转换为“SOCKET”
1>          没有使该转换得以执行的上下文
1>XPlayDecode.cpp(79): error C2568: “!=”: 无法解析函数重载
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsock.h(754): 可能是“int connect(SOCKET,const sockaddr *,int)”
1>XPlayDecode.cpp(79): error C3861: “connect”: 找不到标识符


看到这一堆错误就很恼火,解决的办法很简单,把#include <WinSock2.h> 放到 include <windows.h>r前面 ,在我的CONSOLE程序里直接放到stdafx.h头文件的前面

就行了。