***************************************************************************** Don't include any Windows header files since there are compatibilty problems with names in Octave library. So we should do as following: //# include//# include extern "C" int __stdcall recv(int, char*, int, int); extern "C" int __stdcall send(int, char*, int, int); and link with library wsock32.lib ... *****************************************************************************