How to compile and run C program in Windows cmd ?

Discussion in 'Programming' started by Mackos, Oct 7, 2011.

  1. #1
    Hello guys!
    I'm working on distributed programming in C , and I wonder how to compile and run file using Windows `cmd`?
     
    Mackos, Oct 7, 2011 IP
  2. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #2
    Which compiler do you have?
     
    drhowarddrfine, Oct 7, 2011 IP
  3. p4w4n

    p4w4n Member

    Messages:
    109
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    46
    #3
    you will need to get a compiler(GCC compiler is recomended) to compile and run c programs through cmd
     
    p4w4n, Oct 7, 2011 IP
  4. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #4
    C:>name-of-your-c-compiler name-of-your-c-program-file

    unless your C compiler needs something else.

    You don't usually just compile the program, though - you use a make utility to make it (which may include configuring some file, linking libraries, etc.)
     
    Rukbat, Oct 8, 2011 IP