Home > Development Tools > VSCode > Can vscode run c language?

Can vscode run c language?

藏色散人
Release: 2019-12-21 09:13:52
Original
20934 people have browsed it

Can vscode run c language?

Can vscode run c language?

First, install VScode. Just go to the official website to download the installation package and install it. I won’t go into details here. Then, install the plug-in extension:

Related recommendations: vscode introductory tutorial

Can vscode run c language?

Can vscode run c language?

Then install mingw-w64, correspond to the corresponding version installed on your computer, but now it is generally 64-bit.

The download link is here, but when I installed the MinGW-W64-install.exe file, I had a problem that it could not be downloaded, so it is recommended to directly download the compressed package and decompress it (as shown in the picture):

Can vscode run c language?

After installation, unzip it to the location you want. The next step is to configure the environment variables:

Right-click on My Computer->Properties->Advanced System Settings -> Environment Variables -> Find Path in the system variables and click Edit:

Can vscode run c language?

to the directory you decompressed, then open the command line cmd window and enter gcc -v tests whether the configuration is successful.

Open VScode, create a new folder under the project file you want to write in C language, named .vscode, then create a new C language file in your project directory, and write some test code ( Mine is test.c):

Can vscode run c language?

Click the bug-like button, then click the small gear icon of the settings, select C (GDB), and then you will be asked to choose One, select the first one at this time. After clicking, VScode will automatically generate two files for you, launch.json and tasks.json. At this time, the environment is configured, and CTRL F5 can compile and run the C program.

The above is the detailed content of Can vscode run c language?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template