MinGW Minimalist download starts automatically.
Look in downloads for installer file mingw-get-setup.exe
Accept defaults for following screens. Watch progress bars and tick close boxes.
MinGW Installation ManagerSelect mingw32-base and Apply Changes. You can add other software packages.
Close installation when finish.
Edit Environmental VariableWindows needs to know that a GCC C compiler toolchain is now installed in your computer in directory C:\MingW\bin. Press the Windows key on your keyboard and type Edit the system environment variables
Open Control Panel->System Properties->Advanced Tab->Environmental Variables
Edit Path on the bottom window
add New C:\MinGW\bin where our new GCC compiler is located. Browse can take you there.
You should open that folder in explorer and look around. It is a software build system that can program a laptop or desktop PC.
Restart ComputerOpen CMD window. Type
gcc —version
which gcc.exe
PATHWe see that gcc has been installed and where it is located.
Hello WorldSave notepad file main.c
#include <stdio.h>
int main (void) {
printf("Hello World, C program\n");}Compile and execute from terminal
gcc main.c
a.exeIn the folder we see the output file appear.





Comments