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