Tuesday, August 30, 2016

Compiling program using Command Prompt

Hi all,
I am going to explain the step for compiling the program using CMD(Command Prompt). The same step are almost same for all other compilers.
 For simplicity, I am going to explain for C++ compiler. After following the steps you are able to compile programs using CMD. This will be helpful for developing cloud compiler project.
As many developer facing the problem like :
Output 'gcc' is not recognized as an internal or external command, operable program or batch file.
Step1: Install gcc compiler from in windows. After that you have to make an entry into the Environment Variable path so that compiler is available anywhere in the server/pc. 
Goto Computer -> Properties -> Advanced system settings -> Advanced -> Environment variable -> Path Variable



In that path put the path for bin directory for compiler as shown in screenshot
After that open the CMD and put command gcc/g++
It will Display following ouput
C:\Users\uschauha>gcc
gcc: fatal error: no input files
compilation terminated.

That's it!! Now you are able to compile code from anywhere from your pc. If you have any doubt feel free to ask.
Enjoy...!