delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/04/12/17:44:20

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Reply-To: Cygwin List <cygwin AT cygwin DOT com>
Message-Id: <6.0.1.1.0.20040412173203.03aaa778@127.0.0.1>
X-Sender:
Date: Mon, 12 Apr 2004 17:35:13 -0400
To: "Carlos" <cygwin AT hispavista DOT com>, cygwin AT cygwin DOT com
From: Larry Hall <cygwin-lh AT cygwin DOT com>
Subject: Re: Compilation problems with a simple socket app
In-Reply-To: <web-493153875@hispavista.com>
References: <web-493153875 AT hispavista DOT com>
Mime-Version: 1.0

At 05:23 PM 4/12/2004, you wrote:
>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.


Works for me with gcc 3.3.1 (though it doesn't seem like the gcc version
should be the cause of the problem).  Sounds like a it could be a line-ending
problem though.  You could check if there's a problem there.


--
Larry Hall                              http://www.rfk.com
RFK Partners, Inc.                      (508) 893-9779 - RFK Office
838 Washington Street                   (508) 893-9889 - FAX
Holliston, MA 01746                     


--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019