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

A case of writing c program by vscode

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

Share

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

This article is to share with you the content of vscode writing c program case. Xiao Bian thinks it is quite practical, so share it for everyone to make a reference. Let's follow the editor and have a look.

Get C/C++ extensions

1. Open vscode

Ctrl+Shift+X opens the store.

3, Search C/C++ installation, Restart vscode

II. Installation of GCC

Download MinGW

2. Open the installer and install it to disk D (MinGW folder needs to be created). After installation, MinGW installation manager will be generated.

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

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.

Third, configure intelligent tips

1, write a test file demo.c, click the standard library introduced under the "prompt light", generate c_cpp_properties.json file

2. Edit c_cpp_properties.json

c_cpp_properties.json modified as follows:

IV. 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.

Thank you for reading! About vscode writing c program case to share here, hope the above content can have some help to everyone, so that we 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