error C2011: 'sockaddr' : 'struct' type redefinition

This problem is caused when including  <windows.h>  before  <winsock2.h> . Try arrange your include list that  <windows.h>  is included after  <winsock2.h>  or define  _WINSOCKAPI_  first:

先包含winsock2.h
再包含windows.h

Posted on 2012-12-04 15:39 micheal's tech 阅读(332) 评论(0)   编辑  收藏 引用

你可能感兴趣的:(error C2011: 'sockaddr' : 'struct' type redefinition)