To install gcc compiler in windows operating system do the following :
1- go to http://www.mingw.org to download the mingw installer or simply go directly to http://sourceforge.net/projects/mingw/files/
2- click download mingw-get-inst-****
this will download a small exe to help you download and install the required files.
3- click the exe file downloaded and click next
NOTE: You can install the C++ compiler -If you want – by just clicking the check box besides C++ compiler
The installer will do the rest of the job for you. It will download and install the required files.
You will need to add environment variable to the system to be able to use the gcc command at the command prompt.
Follow the next steps to do this :
1- right click on my computer – > Properties -> Advanced – > Environment variables
2- click the PATH variable as indicated then click EDIT
3- Add ” ; C:\MinGW\bin to the end of the line “
semicolon followed by the path
4 – Now you are able to compile your c applications using GCC compiler.
** To do this, Click Start -> RUN (or keyboard windows tbutton +R) and write CMD
Compile your code by writing the following command:
gcc c_file_name_path -o c_output_filename