
The term 'g++' is not recognized as the name of a cmdlet, function SOLVED in Visual Studio Code
The term 'g++' is not recognized as the name of a cmdlet, function SOLVED in Visual Studio Code
How to solve the error g++ : The term ‘g++’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again in visual studio code is shown
Content
0.24 -> hey everyone in this video I'll be showing you how
to solve the error the term g++ is not recognized
6.48 -> as the name of a cmdlet in Visual Studio code so
let's get started so first thing what you need to
12 -> do is you need to go to the folder where you have
installed MinGW so by default it is present in
18.78 -> this PC local disk C and you'll be having MinGW
over here so if you aren't able to figure out
25.5 -> where you have installed Min GW what you are doing
is just go to your search over here and type mingw
32.16 -> and you'll be getting this MinGW installation
manager just click on open file location
39.36 -> it will be taking you to this particular icon or
application over here so what you are doing is
43.92 -> right click on it again and just click open file
location so this will directly take you to the Min
50.52 -> GW folder as you can see here if I just now click
it I'll be just getting the same path again so in
56.58 -> this minGW folder you need to go to the folder
bin and need to just copy this particular path
61.8 -> it's C minGW and Bin so let me just now copy it
and if you aren't having bin folder in this mingw
68.76 -> folder you need to go to any particular folder
and search for bin all right in some cases it will
73.98 -> be present inside another folder as well so just
copy this path and go to environmental variables
82.8 -> and you'll be getting this one just click
edit environmental variables and you'll be
87.66 -> having this system variables over here just
click on this path and just click edit just
93.9 -> click on new again and just paste it is C mingw
and Bin and just click ok here as well here as
102.9 -> well and after doing that super important thing
close your Visual Studio code and open it again
108.24 -> so that the changes are getting effected so
I will just close it now and reopen it again
113.16 -> so now I have again opened my visual
studio code and if I just now type g++ -v
120.72 -> so here you can see I will be getting the
version over here and even I can run and
124.68 -> compile my program so I will just type
g++ my program name is newpro dot CPP
132.42 -> yeah it is compiling fine and in order
to view the output put dot slash a
136.68 -> and you can see I'm getting this particular output
over here so I hope you have found this video
140.82 -> useful I've also done many other programming
tutorials in C C plus plus Java python node.js
145.56 -> react JS mongodb MySQL so do check other videos
of my channel subscribe me thanks for watching
Source: https://www.youtube.com/watch?v=5hSRaW4swto