gcc not compiling

From: Dotan Cohen (dotancohen_at_gmail.com)
Date: 10/31/05

  • Next message: Brian D. McGrew: "RE: gcc not compiling"
    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
    

  • Next message: Brian D. McGrew: "RE: gcc not compiling"

    Relevant Pages