How to run C language into visual studio code
Step-1: Open visual studio code.
Step-3: Write the c extension on the search bar .
Step-4: Now install the C/C++ extension from the Microsoft .
step-5: Now download the compiler extension. Go to the https://sourceforge.net/projects/mingw . click on the download button.
Step-6: Now click on the MinGW file to run it and then on install button .
Step-7: Click on the continue button to continue the installation.
Step-8: We need to check the Mingw32-base package and Ming32-gcc-g++ package to run and compile the C/ C++ program in the visual studio code editor.
Step-9: Click on the Installation tab (at the top left corner of the dialog box). Here we click on Apply Changes to set the package's installation in MinGW, .
Step-10: After click on the Apply button .
Step-11: After downloading the packages, it shows the installation process of the package then click on the Close button.
Step-12: Go to the installation directory of the MinGW Set Up. Here we installed the setup at the C drive .
Step-13: Double click on the MinGW folder.
Step-14: After that, click on the bin folder and then copy the directory path .Here is the path of the MinGW folder path: C:\MinGW\bin.
Step-15: After copying the directory path, go to This PC -> Right Click on This PC -> Select/ Click on the Properties.
Step-16: After that, click on the Advanced system settings to display a popup box of System Properties .
Step-17: Click on the Environment Variables to set the directory path .
First, we have to click on the System Variables Path and then click on the Edit button .
Step-18: As we click on the Edit button, it shows a popup window to set a new path, we click on the New button and then paste the C:\MinGW\bin path; after that, click the OK button.
Step-19: Similarly, click the OK button to the Environment Variables and System Properties.
Step-20: If we want to check that the MinGW has been successfully installed in the system: go to the Command Prompt or cmd, write the gcc -version, and press the Enter.
Now we can code in the visual studio code by saving file name with .c
Comments
Post a Comment