title: WinSock2.h Compilation Errors
body: <p>I am trying to run a project using Visual studio 2003. But I am getting lot of compilation errors similar to the following.</p>
  
  <p>The errors are pointing to WinSock2.h file. I am copying couple of code snippets from  WinSock2.h file and the corresponding errors</p>
  
  <pre><code>typedef struct fd_set {
      u_int fd_count;               /* how many are SET? */
      SOCKET  fd_array[FD_SETSIZE];   /* an array of SOCKETs */
  } fd_set;
  </code></pre>
  
  <blockquote>
    <p>C:\Program Files\Microsoft Visual Studio .NET
    2003\Vc7\PlatformSDK\Include\WinSock2.h(114): error C2065: 'fd_set' :
    undeclared identifier</p>
  </blockquote>
  
  <pre><code>struct sockaddr {
      u_short sa_family;              /* address family */
      char    sa_data[14];            /* up to 14 bytes of direct address */
  };
  </code></pre>
  
  <blockquote>
    <p>C:\Program Files\Microsoft Visual Studio .NET
    2003\Vc7\PlatformSDK\Include\WinSock2.h(109): error C2143: syntax
    error : missing ';' before '{'</p>
  </blockquote>
  
  <p>The ws2_32.lib file is added to "Configuration properties - Linker - Input - Additional Dependencies". The build configuration platform is win32.</p>
  
  <p>Thanks in advance for your help.</p>