title: error C2065: 'socklen_t' : undeclared identifier
body: <p>The whole error is:</p>
  
  <pre><code>Error   1   error C2065: 'socklen_t' : undeclared identifier    c:\users\richard\documents\visual studio 2010\projects\server\server\server.cpp 41  1   Server
  </code></pre>
  
  <p>This is the problematic line:</p>
  
  <pre><code>int iRcvdBytes=recvfrom(iSockFd, buff, 1024000, 0, (struct sockaddr*)&amp;cliAddr, (socklen_t*)&amp;cliAddrLen);
  </code></pre>
  
  <p>I have these headers included:</p>
  
  <pre><code>#include &lt;winsock2.h&gt;
  #include &lt;windows.h&gt;
  
  #include &lt;direct.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;stdio.h&gt;
  
  #include &lt;iostream&gt;
  #include &lt;fstream&gt;
  #include &lt;sstream&gt;
  #include &lt;string&gt;
  
  #include &lt;cv.h&gt;
  #include &lt;cxcore.h&gt;
  #include &lt;highgui.h&gt;
  </code></pre>
  
  <p>I have also added WS2_32.lib to the linker in Visual Studio 2010.</p>
  
  <p>What else could cause this problem? I'm just trying to rewrite my simple UDP program to work under Windows.</p>