Home  >  Article  >  Development Tools  >  How to install c plug-in in vscode

How to install c plug-in in vscode

藏色散人
藏色散人Original
2019-12-21 09:29:054225browse

How to install c plug-in in vscode

How to install the c plug-in in vscode?

First of all, you have to install the vscode software.

Related recommendations: vscode introductory tutorial

I am an embedded developer using C language I am an engineer on embedded projects and have long used the "mdk integrated development environment" to edit the project code in the early stage. However, because the editing ability of mdk is too frustrating, I have been looking for an auxiliary editor on the Internet to assist in the editing of my embedded project code, and finally fell in love with it. visual studio code is an auxiliary editor, hereafter referred to as VScode

Although it is much more convenient to use VScode to edit my C language project, there are still many problems when VScode is not installed and configured with any "plug-ins" during the initial installation. The disadvantage is that for the automatic completion function, here I suggest that you install and configure the "clang plug-in" to enhance VScode's smart reminder and automatic completion function. Next, I will explain how to install and configure the "clang plug-in"

Step 1: First open the VScode editor

Step 2: Click on the “App Store” bar on the left

Step 3: Enter keywords in the “App Store Search Expansion” bar "clang"

Part 4: Install the prompted "C/c clang command" plug-in

Although the "clang plug-in" is ostensibly installed on vscode, VScode is not yet installed at this time Without the "clang auto-completion function", Vscode will prompt an error as shown below. We also need to install the clang windows version of the software.

Note

Warm reminder: It is best not to include Chinese paths in the project folder opened by VScode, otherwise the "automatic jump function" (C/C plug-in) may It’s no use

Then compatriots who develop C language projects can download a VScode Great Icons plug-in, which can make the small icons of "*.c" "*.h" files display more refreshingly

If it still doesn't work after following the above steps, you can try adding environment variables. The steps are as follows: Computer Properties->Advanced System Settings->Environment Variables->System Variables, New->Variable Name PATH, Variable Value C:\LLVM\bin, fill in according to the actual installation path.

The above is the detailed content of How to install c plug-in in vscode. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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