Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

C method of installing vscod

Shulou Source: shulou.com Published: 2022-06-02 17:40:51 10月03日 Update

Editor to share with you how to install vscod c, I believe that most people do not know much about it, so share this article for your reference, I hope you will learn a lot after reading this article, let's go to know it!

C how to install vscode?

VSCode installation C environment

If a vscode is available, download and install it first.

Next, let's get down to business.

Recommended for related articles and tutorials: vscode tutorial

First: install and configure the Candlestick + compilation environment (MinGW-w64)

1. download

two。 Installation

Be careful

3. Configure the environment

A: add C_INCLUDE_PATH according to your new directory

B: create a new CPLUS_INCLUDE_PATH with the same variable value as above

C: the path to the bin folder where MinGW-w64 is added to the system variable Path

D: restart the computer after completion, because win10 will not automatically update the system variables.

After reboot, the administrator opens cmd and type Gmail +-v

It is displayed as shown in the picture, indicating that the installation is correct.

Then open the vscode installation plug-in and add the configuration

Install the plug-in code runner in 1.vs

two。 User Settin

Open vscode, create a new folder, and then file-> preferences-> Settings, so open the user settings, and add the following configuration to the json file (the following is java, ignore it):

"code-runner.runInTerminal": true, "code-runner.ignoreSelection": true, "code-runner.executorMap": {"cpp": "cd $dir & & gathers + $fileName-o $fileNameWithoutExt.exe & &. / $fileNameWithoutExt.exe", "c": "cd $dir & & gags + $fileName-o $fileNameWithoutExt.exe & &. / $fileNameWithoutExt.exe", "java": "cd $dir & & javac-encoding utf-8$ fileName & & java $fileNameWithoutExt"}

3. Under the newly created folder, create new files

Open c_cpp_properties.json to add the following configuration:

{"configurations": [{"name": "Win32", "includePath": ["${workspaceRoot}", "D:/MinGW/mingw64/x86_64-w64-mingw32/include"], "defines": ["_ DEBUG", "UNICODE", "_ UNICODE"], "intelliSenseMode": "msvc-x64", "browse": {"path": ["${workspaceRoot}", "D:/MinGW/mingw64/x86_64-w64-mingw32/include"], "limitSymbolsToIncludedHeaders": true "databaseFilename": ""}}], "version": 3}

As shown in the figure, modify two paths:

After all the configuration, write the test

Right-click the c file or run in the upper right corner

The above is all the contents of this article "C how to install vscod". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Files configuration folders environment articles methods contents variables plug-ins tutorials users systems paths such as figure next not much premise most articles article tutorials Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn Shulou Tech Info MySQL Redmi MariaDB