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

The method of writing c language by vscode

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

This article will explain in detail about vscode writing c language method, Xiaobian think quite practical, so share to everyone as a reference, I hope you can read this article after harvest.

Get C/C++ extensions

Open vscode

Ctrl+Shift+X Open Store

Search C/C++

Install and restart vscode

install GCC

Download MinGW

Open the installation program, install to disk D (MinGW folder needs to be created), and generate MinGW installation manager after installation

Manager opens automatically (manually if not), click All Packages, select gcc.bin,g++.bin, gdb.bin, click Installation, select Apply Changes, click Apply Submit to install

win+R, enter control to enter the control panel, click System and Installation-> System-> Advanced System Settings-> Environment Variables, find Path-> Edit-> New, paste the installed MinGW bin folder path into it.

Configure Smart Tips

Write a test file demo.c, click on the standard library under the introduction of "prompt light", generate c_cpp_properties.json file

Edit c_cpp_properties.json

c_cpp_properties.json modified as follows:

Start debugging function

F5 or Ctrl+F5 to enable debugging, select C++(GDB/LLDB) to generate launch.json file, modify as follows:

Ctrl+Shift+P Enter Tasks:Configure Task, select Use Module to create task.json file, select Others template to generate task.json file, modify as follows:

If there is an error: process terminated, exit code: 1, maybe gcc has not been loaded by the editor (test method: open the console, type gcc, see the prompt), restart the editor.

About vscode writing c language method to share here, hope the above content can have some help to everyone, can learn more knowledge. If you think the article is good, you can share it so that more people can see it.

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