gcc not compiling
From: Dotan Cohen (dotancohen_at_gmail.com)
Date: 10/31/05
- Previous message: Derek Martin: "Re: Linux killer!"
- Next in thread: Brian D. McGrew: "RE: gcc not compiling"
- Maybe reply: Brian D. McGrew: "RE: gcc not compiling"
- Reply: Derek Martin: "Re: gcc not compiling"
- Reply: gb spam: "Re: gcc not compiling"
- Reply: Vassilios Kotoulas: "Re: gcc not compiling"
- Maybe reply: STYMA, ROBERT E (ROBERT): "RE: gcc not compiling"
- Maybe reply: STYMA, ROBERT E (ROBERT): "RE: gcc not compiling"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 31 Oct 2005 21:03:14 +0200 To: For users of Fedora Core releases <fedora-list@redhat.com>
I'm just getting started in programming C. My first attempt:
#include < stdio.h>
void main () {
printf("\nHello World!\n");
}
Threw this error:
[dotancohen@localhost ~]$ gcc hello.c
hello.c:1:20: error: stdio.h: No such file or directory
hello.c: In function 'main':
hello.c:3: warning: incompatible implicit declaration of built-in
function 'printf'
hello.c:2: warning: return type of 'main' is not 'int'
hello.c:4:2: warning: no newline at end of file
So I googled for "1:20: error: stdio.h: No such file or directory"
and found a post that suggests that the answer to the problem is found
in the gcc manual. So I started reading it, but it is long and I'm not
finding anything!
I think that I'm missing a library stdio.h but I don't know where to
find it, and where to put it once I do find it. Or am I completly
wrong? The error message is pretty clear.
Dotan Cohen
http://technology-sleuth.com/question/how_can_i_be_safe_online.html
-- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
- Previous message: Derek Martin: "Re: Linux killer!"
- Next in thread: Brian D. McGrew: "RE: gcc not compiling"
- Maybe reply: Brian D. McGrew: "RE: gcc not compiling"
- Reply: Derek Martin: "Re: gcc not compiling"
- Reply: gb spam: "Re: gcc not compiling"
- Reply: Vassilios Kotoulas: "Re: gcc not compiling"
- Maybe reply: STYMA, ROBERT E (ROBERT): "RE: gcc not compiling"
- Maybe reply: STYMA, ROBERT E (ROBERT): "RE: gcc not compiling"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
- Re: [PATCH] security_sk_free void return fixup
... Apparently it is valid C99, ... It may work in gcc, but it is invalid
according to ISO C99. ... function whose return type is void. ... return.c:5: warning:
`return' with a value, ... (Linux-Kernel) - Re: Why oh why does this NOT give a compile error?
... void f ... I would expect at least some warning, ... With the
right compiler options, gcc can be a good compiler, though what it produces is a warning about
the more fundamental problem, rather than the one you're actually asking about: ... (comp.lang.c) - Re: Why oh why does this NOT give a compile error?
... void f ... An empty parameter list in a function declaration tells the
compiler ... Also, I would have expected GCC to be smart enough to realize that fand fwere
incompatible signatures, since fwasn't declared as taking varargs, and give a warning on the second
call. ... (comp.lang.c) - Re: POSIX_C_SOURCE
... give a warning on that code, and those warnings can be quite annoying. ... Applying
the patch I posted will stop gcc from issuing the annoying ... somebody thinks the "right"
programming style is. ... Change the compiler flags used by all the affected ports,
... (freebsd-stable) - Weird gcc behaviour with function pointer types
... void g{ ... void (struct foo *); ... blarg.c:6: warning:
assignment from incompatible pointer type ... This looks like a bug in gcc to me -- what
do people ... (comp.lang.python)