ERRORS AFTER INSTALLATION OF VS CODE

ERRORS AFTER INSTALATION OF VS CODE


There are some most common errors that you can face after the installation of visual studio code. This errors are very easy to solve so let's know what are all those errors and how do we will remove that errors.

1. UNABLE TO DETECT COMPILER

            The reason of this error is that vs code is an IDE (Integrated Development Environment) and MinGW is a compiler which we had downloaded from different website that's why our IDE is unable to detect MinGW.

            So to check whether our IDE detects compiler or not just open Powershell or CMD in your computer and type gcc (to check gcc compiler) or g++ (to check compiler for c++).  If show error that gcc  or g++ not recognized as shown below  then it means we have to set path our compiler.



     So in order to do that first of all copy the path of your gcc/g++ compiler just find the MinGW file location which you had downloaded previously, inside MinGW folder click on bin folder and check for gcc/g++. If gcc/g++ files are present then just copy the path e.x C:\MinGW\bin.




Then open control panel ->System Security ->System -> Advanced system settings then small system properties dialog box will pop up like this, there click on Environment Variables. Then select path which is under user variable (note that don't select the path from system variable only select from user variable) and click on edit






Now click on New and then just paste the path of your compiler which you have copied that's all. Now click ok on all boxes and close the control panel .

Now you have successfully resolve your problem. To check whether it's done or not just open your powershell and type gcc or g++. If it shows fatal error no input files then ignore that error our works has done completely. Now you can write code in vs code and that will be successfully compile by your compiler.






Hope you guys learn a lot from this article. If you have any doubt or if you want to suggest anything regarding improvement of this blog please do comment and if you want to learn C++ in easy way join us, keep visiting our blog here you will get all the things regarding C++. Subscribe our site to learn C++ in fast and easy way. THANK YOU .

Comments