delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/08/13/12:46:49

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
Message-ID: <026401c361ba$c2492250$6401a8c0@jag750>
From: "Jag" <Jagjit AT ntlworld DOT com>
To: <cygwin AT cygwin DOT com>
Subject: problem Compiling hello world C Program.
Date: Wed, 13 Aug 2003 17:48:44 +0100
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300

Hi,

I have downloaded cygwin onto one of my pcs, but when i try to compile a
simple program, I get loads of errors

hello.c is

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

printf("Hello World\n");
exit 0;

when i do
gcc -c hello.c, i get the following output

In file included from hello.c:1:
/usr/include/stdio.h:34:20: stddef.h: No such file or directory
/usr/include/stdio.h:37:20: stdarg.h: No such file or directory
In file included from /usr/include/sys/reent.h:14,
from /usr/include/stdio.h:45,
from hello.c:1:
/usr/include/sys/_types.h:22:20: stddef.h: No such file or directory
In file included from /usr/include/sys/reent.h:14,
from /usr/include/stdio.h:45,
from hello.c:1:
/usr/include/sys/_types.h:30: parse error before "wint_t"
/usr/include/sys/_types.h:32: parse error before '}' token
/usr/include/sys/_types.h:33: parse error before '}' token
In file included from /usr/include/stdio.h:45,
from hello.c:1:
/usr/include/sys/reent.h:570: parse error before "_mbstate_t"
/usr/include/sys/reent.h:576: parse error before "_mbrlen_state"
/usr/include/sys/reent.h:577: parse error before "_mbrtowc_state"
/usr/include/sys/reent.h:578: parse error before "_mbsrtowcs_state"
/usr/include/sys/reent.h:579: parse error before "_wcrtomb_state"
/usr/include/sys/reent.h:580: parse error before "_wcsrtombs_state"
/usr/include/sys/reent.h:591: parse error before '}' token
/usr/include/sys/reent.h:605: parse error before '}' token
In file included from /usr/include/stdio.h:46,
from hello.c:1:
/usr/include/sys/types.h:55:21: stddef.h: No such file or directory
In file included from hello.c:1:
/usr/include/stdio.h:176: parse error before "size_t"
/usr/include/stdio.h:182: parse error before "__gnuc_va_list"
/usr/include/stdio.h:183: parse error before "__gnuc_va_list"
/usr/include/stdio.h:184: parse error before "__gnuc_va_list"
/usr/include/stdio.h:196: parse error before "fread"
/usr/include/stdio.h:197: parse error before "fwrite"
/usr/include/stdio.h:217: parse error before "__gnuc_va_list"
/usr/include/stdio.h:222: parse error before "__gnuc_va_list"
/usr/include/stdio.h:223: parse error before "size_t"
/usr/include/stdio.h:224: parse error before "__gnuc_va_list"
/usr/include/stdio.h:225: parse error before "__gnuc_va_list"
/usr/include/stdio.h:226: parse error before "__gnuc_va_list"
/usr/include/stdio.h:229: parse error before "size_t"
/usr/include/stdio.h:280: parse error before "size_t"
/usr/include/stdio.h:285: parse error before "__gnuc_va_list"
/usr/include/stdio.h:286: parse error before "__gnuc_va_list"
/usr/include/stdio.h:287: parse error before "__gnuc_va_list"
/usr/include/stdio.h:288: parse error before "__gnuc_va_list"
/usr/include/stdio.h:289: parse error before "size_t"
/usr/include/stdio.h:290: parse error before "__gnuc_va_list"
/usr/include/stdio.h:291: parse error before "__gnuc_va_list"
/usr/include/stdio.h:292: parse error before "__gnuc_va_list"
/usr/include/stdio.h:294: parse error before "size_t"
/usr/include/stdio.h:295: parse error before "size_t"
In file included from hello.c:2:
/usr/include/stdlib.h:14:20: stddef.h: No such file or directory
In file included from hello.c:2:
/usr/include/stdlib.h:62: parse error before "size_t"
/usr/include/stdlib.h:63: parse error before "__nmemb"
/usr/include/stdlib.h:73: parse error before "__size"
/usr/include/stdlib.h:74: parse error before "size_t"
/usr/include/stdlib.h:75: parse error before "size_t"
/usr/include/stdlib.h:76: parse error before '*' token
/usr/include/stdlib.h:77: parse error before "wchar_t"
/usr/include/stdlib.h:78: parse error before "wchar_t"
/usr/include/stdlib.h:79: parse error before "wchar_t"
/usr/include/stdlib.h:80: parse error before "mbstowcs"
/usr/include/stdlib.h:81: parse error before "_mbstowcs_r"
/usr/include/stdlib.h:82: parse error before "wcstombs"
/usr/include/stdlib.h:83: parse error before "_wcstombs_r"
/usr/include/stdlib.h:90: parse error before "size_t"
/usr/include/stdlib.h:90: parse error before ')' token
/usr/include/stdlib.h:92: parse error before "size_t"
In file included from hello.c:3:
/usr/include/string.h:14:20: stddef.h: No such file or directory
In file included from hello.c:3:
/usr/include/string.h:22: parse error before "size_t"
/usr/include/string.h:23: parse error before "size_t"
/usr/include/string.h:24: parse error before "size_t"
/usr/include/string.h:25: parse error before "size_t"
/usr/include/string.h:26: parse error before "size_t"
/usr/include/string.h:32: parse error before "strcspn"
/usr/include/string.h:34: parse error before "strlen"
/usr/include/string.h:35: parse error before "size_t"
/usr/include/string.h:36: parse error before "size_t"
/usr/include/string.h:37: parse error before "size_t"
/usr/include/string.h:40: parse error before "strspn"
/usr/include/string.h:47: parse error before "strxfrm"
/usr/include/string.h:52: parse error before "size_t"
/usr/include/string.h:53: parse error before "size_t"
/usr/include/string.h:54: parse error before "size_t"
/usr/include/string.h:57: parse error before "size_t"
/usr/include/string.h:58: parse error before "size_t"
/usr/include/string.h:63: parse error before "size_t"
/usr/include/string.h:64: parse error before "size_t"
/usr/include/string.h:65: parse error before "size_t"
/usr/include/string.h:66: parse error before "strlcat"
/usr/include/string.h:67: parse error before "strlcpy"
/usr/include/string.h:68: parse error before "size_t"
/usr/include/string.h:69: parse error before "strnlen"
hello.c:5: parse error before string constant
hello.c:5: warning: conflicting types for built-in function `printf'
hello.c:5: warning: data definition has no type or storage class
hello.c:6: parse error before numeric constant

what am i missing?

Jag


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