[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: gcc not compiling
- From: gb spam <gbofspam gmail com>
- To: For users of Fedora Core releases <fedora-list redhat com>
- Subject: Re: gcc not compiling
- Date: Mon, 31 Oct 2005 14:08:22 -0500
On 10/31/05, Dotan Cohen <dotancohen gmail com> wrote:
> 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
you have a space between "<" and "stdio" which shouldn't be there. it
should just read
#include <stdio.h>
i.e., the file it can't find it " stdio.h"
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]