This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Compilation problems with a simple socket app


Hello. 

I'm using 'gcc 3.2' on 'MS Windows 2000 SP2'
with 'cygwin-1.5.9-1' installed.

I'm trying to build a simple socket app:

------------------//----------------
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <stdio.h>
#include <unistd.h> 

#define SERVER_PORT 1500
#define MAX_MSG 100

int main (int argc, char *argv[])
{  
  return 0;
}
-----------------//---------------------


But I get this error message when trying to
compile:
----------------------//-----------------
Compiler: Default compiler
Executing  gcc.exe...
gcc.exe "F:\cpp\lab\test01.c" -o
"F:\cpp\lab\test01.exe"    -I"f:\Dev-Cpp\include"
-I"F:\cygwin\usr\include"   -L"f:\Dev-Cpp\lib"
In file included from F:/cygwin/usr/include/asm/socket.h:14,
                 from F:/cygwin/usr/include/cygwin/socket.h:23,
                 from F:/cygwin/usr/include/sys/socket.h:15,
                 from F:/cpp/lab/test01.c:2:
F:/cygwin/usr/include/cygwin/if.h:79: parse error
before "caddr_t"

F:/cygwin/usr/include/cygwin/if.h:79: warning: no
semicolon at end of struct or union

F:/cygwin/usr/include/cygwin/if.h:79: warning: no
semicolon at end of struct or union

F:/cygwin/usr/include/cygwin/if.h:81: parse error
before '}' token

F:/cygwin/usr/include/cygwin/if.h:81: warning:
data definition has no type or storage class

F:/cygwin/usr/include/cygwin/if.h:82: parse error
before '}' token

Execution terminated
-----------------------------//----------

What am I doing wrong? Thank you very much.
-----------------------------------------------------------------------------------
Correo POP y 50 MB de espacio en HispaVista
http://www.hispavista.com/

-----------------------------------------------------------------------------------
¿Conoces eBay, el mayor centro de compra y venta en internet?
Móviles, portátiles, pda´s, cd´s, cámaras digitales, videocamaras...
¡Compra ahora a los mejores precios! http://ebay.hispavista.com/

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]