From: "Thai Dang Vu" <thaid@Cybersoft-VN.com>
To: "Francisco Mendez" <iframe@prodigy.net.mx>, <gcc-help@gcc.gnu.org>
Subject: RE: Using gcc
Date: Thu, 28 Mar 2002 20:40:00 -0000 [thread overview]
Message-ID: <B947031D966C464A9A4E6F567C73BA4D19488F@hue.cybersoft.vn> (raw)
Have you tried
gcc -g -Wall -o hello hello.c
yet?
Attention: there's a space between -o and hello.
-----Original Message-----
From: Francisco Mendez [mailto:iframe@prodigy.net.mx]
Sent: Friday, March 29, 2002 11:29 AM
To: gcc-help@gcc.gnu.org
Subject: Using gcc
Hi:
I'm totaly new to c programming, I'm using Red Hat 7.2. Recently I got
the book "Practical C Programming" by Steve Oualline (O'Reilly). In Ch-2
a simple Hello World program is described,
[File: hello/hello.c]
#include <stdio.h>
int main()
{
printf("Hello World\n");
return(0);
}
The file is saved as hello.c
, following are the instructions for compiling from the command line:
gcc -g -Wall -ohello hello.c
The sample fails to compile, unstead I get the following Messages:
hello.c:1: parse error before '['
In file included from usr/include/bits/types.h:143,
from usr/include/stdio.h:36,
from hello.c:2:
usr/include/bits/pthreadtypes.h:48: parse error before 'size_t'
usr/include/bits/pthreadtypes.h:48: warning: no semicolon at end of
structure union
usr/include/bits/pthreadtypes.h:51: parse error before '__stacksize'
usr/include/bits/pthreadtypes.h:51: warning: data definition has no type
or storage class
usr/include/bits/pthreadtypes.h:52: warning: data definition has no type
or storage class
In file included from usr/include/_G_config.h:44;
from usr/include/libio.h:32,
from usr/include/stdio.h:65,
from hello.c:2:
usr/include/gconv.h:72: parse error before 'size_t'
usr/include/gconv.h:85: parse error before 'size_t'
usr/include/gconv.h:94: parse error before 'size_t'
usr/include/gconv.h:170: parse error before 'size_t'
usr/include/gconv.h:170: warning: no semicolon at end of struct or union
usr/include/gconv.h:173: parse error before '}'
usr/include/gconv.h:173: warning: data definition has no type or storage
class
In file included from usr/include/libio.h:32,
from usr/include/libio.h:65,
from hello.c:2:
usr/include/_G_config.h:47: field '__cd' has incomplete type
usr/include/_G_config.h:50: field '__cd' has incomplete type
usr/include/_G_config.h:53: confused by earlier errors, bailing out
So it seems impossible to compile this simple programm. Whatis wrong?
Any help in this respect will be appreciated. Thanks in advance.
Francisco Mendez.
next reply other threads:[~2002-03-29 4:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-28 20:40 Thai Dang Vu [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-12-24 19:40 jjwdeck
2005-12-24 20:00 ` Brian Dessent
2002-03-28 20:40 Mariappan, MaharajanX
2002-03-28 20:30 Francisco Mendez
2001-09-14 8:39 charles scott
2001-09-14 9:14 ` Claudio Bley
2001-09-14 9:28 ` 홍근식
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=B947031D966C464A9A4E6F567C73BA4D19488F@hue.cybersoft.vn \
--to=thaid@cybersoft-vn.com \
--cc=gcc-help@gcc.gnu.org \
--cc=iframe@prodigy.net.mx \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).