C99 Tutorial Part 1 - Installing the MinGW Compiler
Topics covered1. Installing MinGW compiler
2. Setting the environment variable PATH
3. Using the command line compiler to compile programs
Watch the video >>
PATHThis environment variable controls which directories Windows searches for programs. An example value for PATH is C:\Windows;C:\Windows\System32. If you then issue the command foo.exe at a command prompt, Windows will search the current working directory for foo.exe. If it is not found, it will then look for it in C:\Windows, and if it is still not found, it will look for it in C:\Windows\System32.
gccThis command launches the GNU C compiler. The basic syntax for gcc is: gcc [OPTIONS] -o [OUTPUT] [INPUT...]
Examples for OPTIONS are -Wall and -Werror which turn on all warnings and errors on warnings, respectively. An example OUTPUT would be foo.exe and example INPUT is foo.c or foo.o.