How many times do you switch between Windows and Linux just to get the benefit of your favourite compiler?? Now that was the main headache I always had because no other compiler seemed to satisfy me. So I searched and finally got a solution which I would readily share with you all.
There are few simple steps which you need to follow and then you are done. No more switching unnecessarily between the OS. So here goes the steps :
Step 1 :
Goto the site www.mingw.org and at the left side menu Navigation-->Downloads. In the directed page click on
Find the variable "PATH" and click on Edit. Here give the path of the bin file in MinGW.
Step 5 :
This completes you work. Restart your system and you are ready to use GCC in windows.
Commands for compilation :
To compile your file:
gcc filename.c OR g++ filename.cpp
To run your file :
Just type the .exe file name on the command line and hit Enter.
Hope you could get through the process. In case of any queries just feel free to ask questions and I will try by best to solve them. And don't forget to share if you like it. Happy Programming.. :)