今天新写了一个类,编译之后出现如下大量错误,网上搜了不少资料,最终解决办法是需要添加两个头文件
解决方法:(注意:顺序必须是这样)
#include "Winsock2.h"
#include "windows.h"
1>recvDataThread.cpp
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2def.h(91) : warning C4005: 'AF_IPX' : macro redefinition
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(460) : see previous definition of 'AF_IPX'
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2def.h(124) : warning C4005: 'AF_MAX' : macro redefinition
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(479) : see previous definition of 'AF_MAX'
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2def.h(163) : warning C4005: 'SO_DONTLINGER' : macro redefinition
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(402) : see previous definition of 'SO_DONTLINGER'
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2def.h(206) : error C2011: 'sockaddr' : 'struct' type redefinition
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(485) : see declaration of 'sockaddr'
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2def.h(384) : error C2143: syntax error : missing '}' before 'constant'
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2def.h(384) : error C2143: syntax error : missing ';' before 'constant'
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2def.h(384) : error C2059: syntax error : 'constant'
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2def.h(437) : error C2143: syntax error : missing ';' before '}'
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2def.h(437) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2def.h(437) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2def.h(518) : warning C4005: 'IN_CLASSA' : macro redefinition
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(287) : see previous definition of 'IN_CLASSA'
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2def.h(524) : warning C4005: 'IN_CLASSB' : macro redefinition
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(293) : see previous definition of 'IN_CLASSB'
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2def.h(530) : warning C4005: 'IN_CLASSC' : macro redefinition
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(299) : see previous definition of 'IN_CLASSC'
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2def.h(541) : warning C4005: 'INADDR_ANY' : macro redefinition
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(304) : see previous definition of 'INADDR_ANY'
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2def.h(543) : warning C4005: 'INADDR_BROADCAST' : macro redefinition
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(306) : see previous definition of 'INADDR_BROADCAST'
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2def.h(577) : error C2011: 'sockaddr_in' : 'struct' type redefinition
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(312) : see declaration of 'sockaddr_in'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(132) : error C2011: 'fd_set' : 'struct' type redefinition
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(68) : see declaration of 'fd_set'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(167) : warning C4005: 'FD_SET' : macro redefinition
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(102) : see previous definition of 'FD_SET'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(176) : error C2011: 'timeval' : 'struct' type redefinition
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(111) : see declaration of 'timeval'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(232) : error C2011: 'hostent' : 'struct' type redefinition
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(167) : see declaration of 'hostent'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(245) : error C2011: 'netent' : 'struct' type redefinition
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(180) : see declaration of 'netent'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(252) : error C2011: 'servent' : 'struct' type redefinition
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(187) : see declaration of 'servent'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(264) : error C2011: 'protoent' : 'struct' type redefinition
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(199) : see declaration of 'protoent'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(360) : error C2011: 'WSAData' : 'struct' type redefinition
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(322) : see declaration of 'WSAData'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(458) : error C2011: 'sockproto' : 'struct' type redefinition
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(494) : see declaration of 'sockproto'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(500) : error C2011: 'linger' : 'struct' type redefinition
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(531) : see declaration of 'linger'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(513) : warning C4005: 'SOMAXCONN' : macro redefinition
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(544) : see previous definition of 'SOMAXCONN'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(542) : warning C4005: 'FD_READ' : macro redefinition
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(562) : see previous definition of 'FD_READ'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(545) : warning C4005: 'FD_WRITE' : macro redefinition
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(563) : see previous definition of 'FD_WRITE'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(548) : warning C4005: 'FD_OOB' : macro redefinition
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(564) : see previous definition of 'FD_OOB'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(551) : warning C4005: 'FD_ACCEPT' : macro redefinition
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(565) : see previous definition of 'FD_ACCEPT'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(554) : warning C4005: 'FD_CONNECT' : macro redefinition
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(566) : see previous definition of 'FD_CONNECT'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(557) : warning C4005: 'FD_CLOSE' : macro redefinition
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(567) : see previous definition of 'FD_CLOSE'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(1527) : error C2375: 'accept' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(735) : see declaration of 'accept'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(1548) : error C2375: 'bind' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(740) : see declaration of 'bind'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(1567) : error C2375: 'closesocket' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(745) : see declaration of 'closesocket'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(1586) : error C2375: 'connect' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(747) : see declaration of 'connect'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(1607) : error C2375: 'ioctlsocket' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(752) : see declaration of 'ioctlsocket'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(1628) : error C2375: 'getpeername' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(757) : see declaration of 'getpeername'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(1649) : error C2375: 'getsockname' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(762) : see declaration of 'getsockname'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(1672) : error C2375: 'getsockopt' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(767) : see declaration of 'getsockopt'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(1693) : error C2375: 'htonl' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(774) : see declaration of 'htonl'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(1710) : error C2375: 'htons' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(776) : see declaration of 'htons'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(1728) : error C2375: 'inet_addr' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(778) : see declaration of 'inet_addr'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(1745) : error C2375: 'inet_ntoa' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(780) : see declaration of 'inet_ntoa'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(1763) : error C2375: 'listen' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(782) : see declaration of 'listen'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(1781) : error C2375: 'ntohl' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(786) : see declaration of 'ntohl'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(1798) : error C2375: 'ntohs' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(788) : see declaration of 'ntohs'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(1818) : error C2375: 'recv' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(790) : see declaration of 'recv'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(1843) : error C2375: 'recvfrom' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(796) : see declaration of 'recvfrom'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(1869) : error C2375: 'select' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(804) : see declaration of 'select'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(1893) : error C2375: 'send' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(811) : see declaration of 'send'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(1918) : error C2375: 'sendto' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(817) : see declaration of 'sendto'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(1944) : error C2375: 'setsockopt' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(825) : see declaration of 'setsockopt'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(1966) : error C2375: 'shutdown' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(832) : see declaration of 'shutdown'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(1986) : error C2375: 'socket' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(836) : see declaration of 'socket'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(2009) : error C2375: 'gethostbyaddr' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(843) : see declaration of 'gethostbyaddr'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(2029) : error C2375: 'gethostbyname' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(848) : see declaration of 'gethostbyname'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(2047) : error C2375: 'gethostname' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(850) : see declaration of 'gethostname'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(2067) : error C2375: 'getservbyport' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(854) : see declaration of 'getservbyport'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(2087) : error C2375: 'getservbyname' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(858) : see declaration of 'getservbyname'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(2106) : error C2375: 'getprotobynumber' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(862) : see declaration of 'getprotobynumber'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(2124) : error C2375: 'getprotobyname' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(864) : see declaration of 'getprotobyname'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(2145) : error C2375: 'WSAStartup' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(868) : see declaration of 'WSAStartup'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(2163) : error C2375: 'WSACleanup' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(872) : see declaration of 'WSACleanup'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(2180) : error C2375: 'WSASetLastError' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(874) : see declaration of 'WSASetLastError'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(2197) : error C2375: 'WSAGetLastError' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(876) : see declaration of 'WSAGetLastError'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(2214) : error C2375: 'WSAIsBlocking' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(878) : see declaration of 'WSAIsBlocking'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(2231) : error C2375: 'WSAUnhookBlockingHook' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(880) : see declaration of 'WSAUnhookBlockingHook'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(2248) : error C2375: 'WSASetBlockingHook' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(882) : see declaration of 'WSASetBlockingHook'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(2265) : error C2375: 'WSACancelBlockingCall' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(884) : see declaration of 'WSACancelBlockingCall'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(2287) : error C2375: 'WSAAsyncGetServByName' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(886) : see declaration of 'WSAAsyncGetServByName'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(2314) : error C2375: 'WSAAsyncGetServByPort' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(894) : see declaration of 'WSAAsyncGetServByPort'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(2340) : error C2375: 'WSAAsyncGetProtoByName' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(902) : see declaration of 'WSAAsyncGetProtoByName'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(2365) : error C2375: 'WSAAsyncGetProtoByNumber' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(909) : see declaration of 'WSAAsyncGetProtoByNumber'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(2390) : error C2375: 'WSAAsyncGetHostByName' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(916) : see declaration of 'WSAAsyncGetHostByName'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(2417) : error C2375: 'WSAAsyncGetHostByAddr' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(923) : see declaration of 'WSAAsyncGetHostByAddr'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(2440) : error C2375: 'WSACancelAsyncRequest' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(932) : see declaration of 'WSACancelAsyncRequest'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(2461) : error C2375: 'WSAAsyncSelect' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(934) : see declaration of 'WSAAsyncSelect'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(3910) : error C2059: syntax error : '}'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(3910) : error C2143: syntax error : missing ';' before '}'
1>c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(3910) : error C2059: syntax error : '}'
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2ipdef.h(39) : error C2143: syntax error : missing ';' before '{'
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2ipdef.h(39) : error C2447: '{' : missing function header (old-style formal list?)
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2ipdef.h(119) : warning C4005: 'IP_TOS' : macro redefinition
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(352) : see previous definition of 'IP_TOS'
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2ipdef.h(120) : warning C4005: 'IP_TTL' : macro redefinition
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(351) : see previous definition of 'IP_TTL'
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2ipdef.h(121) : warning C4005: 'IP_MULTICAST_IF' : macro redefinition
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(346) : see previous definition of 'IP_MULTICAST_IF'
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2ipdef.h(122) : warning C4005: 'IP_MULTICAST_TTL' : macro redefinition
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(347) : see previous definition of 'IP_MULTICAST_TTL'
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2ipdef.h(123) : warning C4005: 'IP_MULTICAST_LOOP' : macro redefinition
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(348) : see previous definition of 'IP_MULTICAST_LOOP'
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2ipdef.h(124) : warning C4005: 'IP_ADD_MEMBERSHIP' : macro redefinition
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(349) : see previous definition of 'IP_ADD_MEMBERSHIP'
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2ipdef.h(125) : warning C4005: 'IP_DROP_MEMBERSHIP' : macro redefinition
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(350) : see previous definition of 'IP_DROP_MEMBERSHIP'
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2ipdef.h(126) : warning C4005: 'IP_DONTFRAGMENT' : macro redefinition
1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(353) : see previous definition of 'IP_DONTFRAGMENT'
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2tcpip.h(750) : error C2061: syntax error : identifier 'MULTICAST_MODE_TYPE'
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2tcpip.h(757) : error C2065: 'PIP_MSFILTER' : undeclared identifier
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2tcpip.h(757) : error C2146: syntax error : missing ';' before identifier 'Filter'
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2tcpip.h(757) : error C2065: 'Filter' : undeclared identifier
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2tcpip.h(759) : error C2065: 'SourceCount' : undeclared identifier
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2tcpip.h(760) : error C2065: 'Filter' : undeclared identifier
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2tcpip.h(760) : error C2070: ''unknown-type'': illegal sizeof operand
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2tcpip.h(760) : error C2065: 'SourceList' : undeclared identifier
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2tcpip.h(760) : error C2070: ''unknown-type'': illegal sizeof operand
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2tcpip.h(761) : error C3861: 'WSASetLastError': identifier not found
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2tcpip.h(765) : error C2065: 'IP_MSFILTER' : undeclared identifier
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2tcpip.h(765) : error C2070: ''unknown-type'': illegal sizeof operand
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2tcpip.h(765) : error C2065: 'SourceCount' : undeclared identifier
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2tcpip.h(766) : error C2065: 'Filter' : undeclared identifier
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2tcpip.h(766) : error C2065: 'PIP_MSFILTER' : undeclared identifier
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2tcpip.h(766) : error C2146: syntax error : missing ';' before identifier 'HeapAlloc'
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2tcpip.h(767) : error C2065: 'Filter' : undeclared identifier
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2tcpip.h(768) : error C3861: 'WSASetLastError': identifier not found
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2tcpip.h(772) : error C2065: 'Filter' : undeclared identifier
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2tcpip.h(772) : error C2227: left of '->imsf_multiaddr' must point to class/struct/union/generic type
1> type is ''unknown-type''
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2tcpip.h(773) : error C2065: 'Filter' : undeclared identifier
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2tcpip.h(773) : error C2227: left of '->imsf_interface' must point to class/struct/union/generic type
1> type is ''unknown-type''
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2tcpip.h(774) : error C2065: 'Filter' : undeclared identifier
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2tcpip.h(774) : error C2227: left of '->imsf_fmode' must point to class/struct/union/generic type
1> type is ''unknown-type''
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2tcpip.h(774) : error C2065: 'FilterMode' : undeclared identifier
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2tcpip.h(775) : error C2065: 'Filter' : undeclared identifier
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2tcpip.h(775) : error C2227: left of '->imsf_numsrc' must point to class/struct/union/generic type
1> type is ''unknown-type''
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2tcpip.h(775) : error C2065: 'SourceCount' : undeclared identifier
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2tcpip.h(776) : error C2065: 'SourceCount' : undeclared identifier
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2tcpip.h(778) : error C2065: 'Filter' : undeclared identifier
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2tcpip.h(778) : error C2227: left of '->imsf_slist' must point to class/struct/union/generic type
1> type is ''unknown-type''
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2tcpip.h(778) : error C2065: 'SourceList' : undeclared identifier
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2tcpip.h(778) : error C2065: 'SourceCount' : undeclared identifier
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2tcpip.h(778) : error C2065: 'SourceList' : undeclared identifier
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2tcpip.h(778) : error C2070: ''unknown-type'': illegal sizeof operand
1>c:\program files\microsoft sdks\windows\v6.0a\include\ws2tcpip.h(778) : fatal error C1003: error count exceeds 100; stopping compilation
参考资料:
http://bbs.csdn.net/topics/310067652