Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

How to make c programs on Linux

rohit2383rohit2383 Member Posts: 80 ✭✭
Please tell me how to make C programs on linux. I have Red Hat Linux 7.1
.I have made C programs at on Linux in my college using the pico editor
after making the program we saved it and then compiled it using cc command but when I try this at home it does'nt recognize this command please help
P.S I am a newbie in Linux

Comments

  • abcabc Member Posts: 443
    : Please tell me how to make C programs on linux. I have Red Hat Linux 7.1
    : .I have made C programs at on Linux in my college using the pico editor
    : after making the program we saved it and then compiled it using cc command but when I try this at home it does'nt recognize this command please help
    : P.S I am a newbie in Linux
    :

    Use gcc instead of cc.
  • zeronezerone Member Posts: 24
    : : Please tell me how to make C programs on linux. I have Red Hat Linux 7.1
    : : .I have made C programs at on Linux in my college using the pico editor
    : : after making the program we saved it and then compiled it using cc command but when I try this at home it does'nt recognize this command please help
    : : P.S I am a newbie in Linux
    : :
    :
    : Use gcc instead of cc.
    :

    To see all the options type: man gcc

    example:

    gcc -c example.c -o program











  • BASIC FriendBASIC Friend Member Posts: 354
    : : : Please tell me how to make C programs on linux. I have Red Hat Linux 7.1
    : : : .I have made C programs at on Linux in my college using the pico editor
    : : : after making the program we saved it and then compiled it using cc command but when I try this at home it does'nt recognize this command please help
    : : : P.S I am a newbie in Linux
    : : :
    : :
    : : Use gcc instead of cc.
    : :
    :
    : To see all the options type: man gcc
    :
    : example:
    :
    : gcc -c example.c -o program



    You could create a link to gcc named cc. put it in the same directory a gcc (/usr/bin/ i think). You may need to be logged in as root to do this.
    [code]
    [robert@localhost robert]$ ln -s /usr/bin/gcc /usr/bin/cc
    [/code]
    if (and i think it does) gcc has the same options as unix cc then you can compile the same way you would with unix. Even makefiles may work.

  • sujaysujay Member Posts: 2
    : Please tell me how to make C programs on linux. I have Red Hat Linux 7.1
    : .I have made C programs at on Linux in my college using the pico editor
    : after making the program we saved it and then compiled it using cc command but when I try this at home it does'nt recognize this command please help
    : P.S I am a newbie in Linux
    :
    hi there
    myself sujay
    if on red hat linux 7.2
    then just open vi editor
    cli are:
    vi filename
    press insert write the c prog
    :wq
    then
    cc filename
    then
    ./a.out
    this will run ur program
    this is the complete answer to ur qns.
    please try this out and reply me about urself at sujay_oec03@yahoo.co.in
    biiiiiiii
    sujay
    bi rohit



Sign In or Register to comment.