gcc is not recognized as the name of a cmdlet Error in VSC || gcc is not recognized as an internal or external command Problem in VSC
gcc is not Recognized as the Name of a cmdlet Error in VSC or
gcc is not recognized as an internal or external command Problem in VSC
If you are having trouble with the error message 'gcc is not recognised as the name of a cmdlet' in VS code, then I'll explain how to fix it.
I assure you that the problem will be completely resolved after you use my approach.
Please follow my guidance.
Reason :
The reason of the problem is you haven't installed any gcc till now, gcc means it will compile your C or C++ code.
If you believe that installing VSC will allow your C or C++ program to execute, you are mistaken. Instead of being a compiler, VSC is an editor.
Installing a compiler that can compile any particular language is necessary in order to compile C, C++, or any other language.
Because your computer doesn't have a compiler or gcc (a compiler for the C or C++ languages), this issue is apparent.
1. In order to compile C or C++ programs, you must install a compiler. It is advised by VSC to install the MinGW compiler. The compiler must be installed in addition to being added to VSC.
Click the following link to get MinGW:
https://drive.google.com/file/d/1ujOYZFIc_m_qAuisUk4bVT52SZo_XIWZ/view?usp=drivesdk
Please follow this steps to these instructions to install and add it to VSC.
2. You must add the MinGW bin directory to your system's PATH environment variable in order to utilize MinGW with Visual Studio Code.
To achieve this, open the Start menu and type "Environment Variables" into the search box. The "Edit the system environment variables" button should be clicked after the "Environment Variables" button. Go down to "Path" in the "System Variables" section and select "Edit".
Add the
path to the MinGW bin directory (for example, "C:\MinGW\bin") to the
list of paths.
3. Next, just enter "cmd" to launch the command prompt and type "gcc —version" into the box that appears.
Your gcc version is now visible.
That indicates that the gcc has been successfully installed.
4.At this point, VSC needs the MinGW compiler added.
Simply launch VSC and write some C or C++ code to add it.
Try running or compiling it, and a pop-up message asking you to choose your compiler will appear. Choose MinGW compiler from that list, and then press Enter.
Once the program has been properly run, you can view the output.
It is the only way to fix the "gcc is not recognised" issue.
Please leave a comment if you have any issues applying my procedure.
You can contact me at ranjankumarjana304@gmail.com, if you are facing any problem regarding applying this procedure.

Post a Comment