Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Can vscode be used to run c language

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article is about whether vscode can be used to run the c language. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

Can vscode run c language?

First of all, install VScode, download the installation package directly on the official website and install it. I won't repeat it here. Then, install the plug-in extension:

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

The download link is here, but I have a problem when I install its MinGW-W64-install.exe file, so it is recommended to download the zip file directly (as shown in figure):

After installation, extract it to the location you want, and then configure the environment variables:

Right click on my computer-> Properties-> Advanced system Settings-> Environment variables-> find Path in the system variable and click Edit:

Change to the directory you unzipped, then open the command line cmd window and type gcc-v to test whether the configuration is successful.

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

Click the button that looks like a bug, and then click the setting gear icon, select C++ (GDB), and then you will be asked to select another one, at this time select the first, VScode will automatically generate two files for you, launch.json and tasks.json, when the environment is configured, CTRL+F5 can compile and run C programs.

Thank you for reading! This is the end of the article on whether vscode can be used to run c language. I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report