delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/04/13/23:53:25

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: <Robert DOT Bram AT infotech DOT monash DOT edu DOT au>
From: "Robert Mark Bram" <relaxedrob AT optusnet DOT com DOT au>
To: "Cygwin" <cygwin AT cygwin DOT com>
Subject: C libraries
Date: Mon, 14 Apr 2003 13:54:04 +1000
Message-ID: <DDEDIPLLKIAMLBCBFCHEKEJJCJAA.relaxedrob@optusnet.com.au>
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106

Hi All

I am aware that this might not be a *cygwin* problem - but I think it has to
do with libraries I don't have (or don't have in the right place) and I
would very much appreciate some assistance.

I am trying to compile a sample piece of c code:
#include <stdio.h>

int main(int argc, char *argv[])
{ int ch;
  int vowel_count = 0,
      other_char_count = 0;

  while ((ch = getchar()) != EOF)
    switch (ch)
    {
      case 'a':
      case 'e':
      case 'i':
      case 'o':
      case 'u': vowel_count++;
              break;
      default:  other_char_count++;
    }
  printf("Vowels: %d; Other: %d\n",
	vowel_count, other_char_count);
  exit(0);
}


I get a stream of errors from gcc reporting missing files..

$ gcc text.c
In file included from /usr/include/stdio.h:29,
                 from text.c:1:
/usr/include/_ansi.h:16:24: sys/config.h: No such file or directory
In file included from text.c:1:
/usr/include/stdio.h:45:23: sys/reent.h: No such file or directory
/usr/include/stdio.h:46:23: sys/types.h: No such file or directory
In file included from text.c:1:
/usr/include/stdio.h:50: parse error before "fpos_t"
/usr/include/stdio.h:51: parse error before "FILE"
/usr/include/stdio.h:57:23: sys/stdio.h: No such file or directory
/usr/include/stdio.h:162: parse error before '*' token
/usr/include/stdio.h:164: parse error before '*' token
/usr/include/stdio.h:165: parse error before '*' token
 .... <snip>

When I launched Cygwin's setup.exe, I selecte the gcc and make utilities.
Was there another option I should have selected to include the library files
mentioned here or is my error of some other kind?

Thanks for any advice!

Rob
:)
:->
:-}


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.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