title: How to compile C program on command line using MinGW?
body: <p>What command does one have to enter at the command line in Windows 7 to compile a basic C program?</p>
  
  <p>Like I am literally wondering what you type in the command prompt, to compile a .c file.</p>
  
  <p>I tried:</p>
  
  <pre><code>&gt; gcc foo.c
  </code></pre>
  
  <p>But it says: </p>
  
  <pre><code>'gcc' is not recognized as an internal or external command, 
   operable program or batch file.
  </code></pre>
  
  <p>I also tried:</p>
  
  <pre><code>&gt; minGW foo.c
  </code></pre>
  
  <p>But I got back:         </p>
  
  <pre><code> 'minGW' is not recognized as an internal or external command, 
    operable program or batch file.
  </code></pre>
  
  <p>I have a path environment variable set to where MinGW is installed:</p>
  
  <pre><code>C:\Program Files (x86)\CodeBlocks\MinGW\bin
  </code></pre>
  
  <p>I can't really find any information on where I'm going wrong, and can't find anything in the official MinGW documentation, as it seems like this is something so simple, sort of an embarrassing question, that it's figured people know what to do?</p>