For Windows:
- Install MinGW or Dev C++
- Open Environment Variables
- In System Variable select Path -> Edit -> New
- Copy this
C:\Program Files (x86)\Dev-Cpp\MinGW64\bin
to the New window. (If you have MinGW installed copy its /bin path). - To check if you have added it successfully: Open CMD -> Type "gcc" and it should return:
gcc: fatal error: no input files compilation terminated.
- Install C/C++ for Visual Studio Code && C/C++ Compile Run || Code Runner
- If you installed only C/C++ Compile Run extension you can compile your program using F6/F7
- If you installed the second extension you can compile your program using the "play" button in the top bar.
Hello, thank you.
ReplyDeleteI installed all but i have problem to run and cmd or output panel. idon't anything show me.
I did exactly what was said and I still get the same error as GCC is not recognized as a ninternal or external command operable program or batch file.
ReplyDeleteCheck if you added spaces in your file name. and if you have remove the spaces.
DeletePS D:\New folder 5\instructor and operator> cd "d:\New folder 5\instructor and operator\" ; if ($?) { gcc for lopp.c -o for lopp } ; if ($?) { .\for lopp }
ReplyDeletegcc.exe: error: for: No such file or directory
gcc.exe: error: lopp.c: No such file or directory
gcc.exe: error: lopp: No such file or directory
gcc.exe: fatal error: no input files
compilation terminated.
i am facing same problem
Deletesame issue tell me if you get rid of it and how you get rid of it.
Delete"{ .\for lopp }" ==> There should not be any spaces in the name of the file.
ReplyDeleteyep this works!
DeleteI have both dev c++ and vs code the problem is that both compilers are working at a same time when I am working on vs code pls help
ReplyDeletehow do i get vscode to give me the output in cmd as in the picture?
ReplyDelete