请教一个关于用winsocket实现组播碰到一个问题

类别:VC语言 点击:0 评论:0 推荐:

c:\program files\microsoft visual studio\vc98\include\winsock2.h(148) : error C2011: 'timeval' : 'struct' type redefinition
c:\program files\microsoft visual studio\vc98\include\winsock2.h(204) : error C2011: 'hostent' : 'struct' type redefinition
c:\program files\microsoft visual studio\vc98\include\winsock2.h(217) : error C2011: 'netent' : 'struct' type redefinition
c:\program files\microsoft visual studio\vc98\include\winsock2.h(224) : error C2011: 'servent' : 'struct' type redefinition
c:\program files\microsoft visual studio\vc98\include\winsock2.h(231) : error C2011: 'protoent' : 'struct' type redefinition
c:\program files\microsoft visual studio\vc98\include\winsock2.h(316) : error C2011: 'in_addr' : 'struct' type redefinition
c:\program files\microsoft visual studio\vc98\include\winsock2.h(374) : error C2011: 'sockaddr_in' : 'struct' type redefinition
c:\program files\microsoft visual studio\vc98\include\winsock2.h(384) : error C2011: 'WSAData' : 'struct' type redefinition
c:\program files\microsoft visual studio\vc98\include\winsock2.h(436) : warning C4005: 'SO_DONTLINGER' : macro redefinition
        c:\program files\microsoft visual studio\vc98\include\winsock.h(391) : see previous definition of 'SO_DONTLINGER'
c:\program files\microsoft visual studio\vc98\include\winsock2.h(489) : warning C4005: 'AF_IPX' : macro redefinition
        c:\program files\microsoft visual studio\vc98\include\winsock.h(449) : see previous definition of 'AF_IPX'
c:\program files\microsoft visual studio\vc98\include\winsock2.h(512) : warning C4005: 'AF_MAX' : macro redefinition
        c:\program files\microsoft visual studio\vc98\include\winsock.h(468) : see previous definition of 'AF_MAX'
c:\program files\microsoft visual studio\vc98\include\winsock2.h(518) : error C2011: 'sockaddr' : 'struct' type redefinition
c:\program files\microsoft visual studio\vc98\include\winsock2.h(527) : error C2011: 'sockproto' : 'struct' type redefinition
c:\program files\microsoft visual studio\vc98\include\winsock2.h(566) : error C2011: 'linger' : 'struct' type redefinition
c:\program files\microsoft visual studio\vc98\include\winsock2.h(579) : warning C4005: 'SOMAXCONN' : macro redefinition
        c:\program files\microsoft visual studio\vc98\include\winsock.h(533) : see previous definition of 'SOMAXCONN'
c:\program files\microsoft visual studio\vc98\include\winsock2.h(604) : warning C4005: 'FD_READ' : macro redefinition
        c:\program files\microsoft visual studio\vc98\include\winsock.h(551) : see previous definition of 'FD_READ'
c:\program files\microsoft visual studio\vc98\include\winsock2.h(607) : warning C4005: 'FD_WRITE' : macro redefinition
        c:\program files\microsoft visual studio\vc98\include\winsock.h(552) : see previous definition of 'FD_WRITE'
c:\program files\microsoft visual studio\vc98\include\winsock2.h(610) : warning C4005: 'FD_OOB' : macro redefinition
        c:\program files\microsoft visual studio\vc98\include\winsock.h(553) : see previous definition of 'FD_OOB'
c:\program files\microsoft visual studio\vc98\include\winsock2.h(613) : warning C4005: 'FD_ACCEPT' : macro redefinition
        c:\program files\microsoft visual studio\vc98\include\winsock.h(554) : see previous definition of 'FD_ACCEPT'

........

我在编写一个组播类的时候,加上了文件 #include <winsock2.h>  调试的时候出现了上面的那些问题 ,主要就是提示XXXXredefinition :  请哪位指点一下问题所在 ,谢谢先

本文地址:http://com.8s8s.com/it/it98.htm