Skip to main content

How to Install/Run GCC compiler in Windows Command Prompt

        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 Download mingw-get-setup.exe. Download the file and run.

Step 2 :
While installing mingw just follow the steps and finally you will see the command prompt popping up downloading the respected files. This will take some time. Finally click on finish.

Step 3:
This finishes your job. Only one more step and you are done. Goto Control Panel-->System-->Advanced-->Environment Variables.



Step 4:
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.. :)

Comments

Post a Comment

Popular posts from this blog

IIIT Bangalore interview

You would also like Preparing for Interview , Getting into IIITB ,  Preparing for Online Exam , and FAQ on MS in IIITB We reached the campus for the interview 5 minutes before the scheduled time. I attended a lot of interviews before this but the interview at IIITB seemed special. A little bit of tension and the joy to be in Bangalore balanced my psyche as my brother parked the car in the parking lot. He was my cousin’s friend who was there to accompany me as he himself was a student of IIITB . Nevertheless, both of us went to the help desk located at the main gate where I had to verify myself as me. Then we were handed over a paper which listed all the process that was going to be held and was directed to the main building. Impressive as we already knew what all we had to do without any problem. So we headed towards the main building. It looked great from outside with some perfect combination of colors and a large logo at the top. The campus was tidy enough which seemed ...

IIITB : Preparing for the Online Exam

Now here you are, at the most important part-The Preparation. Well there's nothing to be feared or getting tensed. These exams are all about testing your capabilities. If you are pretty sure about what you can do, then you are there. I will be dividing the article in two parts i.e, Online Exam and Interview (Follow the link provided) and I will be short. Online Exam : The first hurdle, and you need to be fast and smart at the same time. If you have not appeared any competitive exams before then take this as a must suggestion. You ought to be fast and value each second in a minute. The exam will be for some odd 2 hours and you will have 3 sections, viz, APTITUDE, MATHS and PROGRAMMING.           Aptitude:  This section consists of some basic English questions(Articles, Prepositions, Sentence Completion, Antonyms, Synonyms etc), Logical questions and some tricky questions. They are easy but needs some practice. As you have limited time for each section...

IIITB : Preparing for the Interview

Congratulations if you cleared the Written Exam. Just one more step and you are through. Interview is the most important part in any selection process. It is here that you get the chance to prove yourself in front of the professionals. So if you are confident of your knowledge and presentability then there is no need to worry. Interview is conducted for three days in a row for all the MTech students(There are around 1000 students called for interview). You will be allotted a day and will be asked to report to the college on the specified day. The process will basically cover the whole day with many events like Document clarifications, Biometric Scans, Interview etc. The Interview is a one-to-one process where you will be interviewed by a Professor of the college. The interview will last for around 20 minutes where you will be asked several questions which you need to answer precisely. The questions will be all typical interview questions like:       ...