Find the answer to your Linux question:
Results 1 to 4 of 4
Hello everyone, I've tried instralling the c and c++ compilers on my fedora 13 machine and none of them seem to work. For example. i have this extremely simple c ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2010
    Posts
    8

    [SOLVED] cc and gcc compilers don't work


    Hello everyone,

    I've tried instralling the c and c++ compilers on my fedora 13 machine and none of them seem to work. For example. i have this extremely simple c program that i try to compile and nothing works.

    Code:
    #include "stdio.h"
    
    printf("Hello World");
    when i type
    Code:
    [####localhost Desktop]# cc hello.c
    i get this error
    Code:
    hello.c:3: error: expected declaration specifiers or ‘...’ before string constant
    hello.c:3: warning: data definition has no type or storage class
    hello.c:3: error: conflicting types for ‘printf’
    hello.c:3: note: a parameter list with an ellipsis can’t match an empty parameter name list declaration

    i've tried intalling a group of developers tools using
    Code:
    yum groupinstall "Developers Tools"
    and nothing......

    Any ideas?

  2. #2
    Linux Engineer rcgreen's Avatar
    Join Date
    May 2006
    Location
    the hills
    Posts
    1,134
    try

    Code:
    #include <stdio.h>
    
    int main()
    {
    printf("hello world\n");
    return 0;
    }

  3. #3
    Just Joined!
    Join Date
    Aug 2010
    Posts
    8
    Huh......so it was just a programming syntax error.....but what does all that error garbage that it spat out mean?

  4. #4
    Linux Engineer rcgreen's Avatar
    Join Date
    May 2006
    Location
    the hills
    Posts
    1,134
    That's the compiler giving the technical description
    of the errors. It's hard to figure out.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •