当前位置:网站首页>Visual studio code installation package download slow & Installation & environment configuration & new one-stop explanation
Visual studio code installation package download slow & Installation & environment configuration & new one-stop explanation
2022-07-25 01:09:00 【A pig lacking a little luck】
One 、 download
On the official website Download Visual Studio Code - Mac, Linux, Windows download , The following Windows For example

Browser download is very slow , We enter the download page , Copy download link

Will download az764295.vo.msecnd.net Replace with vscode.cdn.azure.cn Use domestic mirror servers to speed up .
https:// vscode.cdn.azure.cn/stable/92d25e35d9bf1a6b16f7d0758f25d48ace11e5b9/VSCodeSetup-x64-1.69.0.exe

Two 、 install
Check the I agree to this agreement option , And then click 【 next step 】

The default installation path can be selected , Of course, you can also customize . The screenshot is a custom selected path :D:\vs code\Microsoft VS Code

Pay attention to the installation path settings 、 Environment variables are automatically added to the system by default , Check all of the following options :
Target location : D:\vs code\Microsoft VS Code Start menu folder : Visual Studio Code
installation is complete :

After installation, open the following page of the software :

Install Sinochem package :

Or click the expand button on the left , Then type... In the input box Chinese,【 chinese ( Simplified Chinese character )】 Click on the install

Install the page after restarting the Chinese version :

3、 ... and 、 install cpptools Tools
Just open a .cpp file , Will ask you if you want to install cpptools. It can also be installed in this way

Four 、 download MinGW
Download address :MinGW-w64 - for 32 and 64 bit Windows - Browse Files at SourceForge.net
Downloaded files : Don't click after entering the website "Download Lasted Version", Slide down , Find the latest version of "x86_64-posix-seh".
install MinGW: After downloading is a 7z The package , After decompression, move to the location you want to install . My installation location is :D:\vs code\x86_64-8.1.0-release-posix-seh-rt_v6-rev0\mingw64\bin
MinGW Decompress the compiler's compressed package and put it in your convenient Directory , Copy file bin The path to the file directory ( You can use it later )

Find the environment variable in the system properties , Then find it in the system variable path, Click edit , Choose new , Then paste the path copied above , Then it's OK to make sure all the way , Look at the picture below , More specific and convenient .


Check if the configuration is successful
Press down win+R
Input cmd
Enter you MinGW The disk on which the compiler is located , Like mine in D disc , I'll type it in D:, Input according to your choice .
Get into MinGW Compiler bin File path , We copied it above , Like mine D:\vs code\x86_64-8.1.0-release-posix-seh-rt_v6-rev0\mingw64\bin, According to your choice .
Input gcc -v

If the figure above appears, it means success .
5、 ... and 、 Easy to use .cpp File configuration C++ Environmental Science
New folder ( Used to put vsCode Project ), For example, my name is first
stay first Create one under the folder .vscode Folder ( It's fixed ) And create 3 File
Namely c_cpp_properties.json,launch.json,tasks.json
Create a first Put subfolders of into projects , Let's say mine is helloWorld( Any folder name ), Then create it under the folder C/C++ file , For example, I created it here helloWorld.cpp
stay c_cpp_properties.json,launch.json,tasks.json Fill in the corresponding information in the three documents .
(1)c_cpp_properties.json
{
"configurations": [
{
"name": "Win64",
"includePath": ["${workspaceFolder}/**"],
"defines": ["_DEBUG", "UNICODE", "_UNICODE"],
"windowsSdkVersion": "10.0.17763.0",
"compilerPath": "D:\\vs code\\x86_64-8.1.0-release-posix-seh-rt_v6-rev0\\mingw64\\bin\\g++.exee", /* Modify it to be yourself bin In the catalog g++.exe, The path here is a little different from the file directory copied in the computer , Here are two backslashes \\*/
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "${default}"
}
],
"version": 4
}
(2)launch.json
{
// Use IntelliSense Learn about properties .
// Hover to see the description of an existing property .
// For more information , Please visit : https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "g++.exe build and debug active file",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"miDebuggerPath": "D:\\vs code\\x86_64-8.1.0-release-posix-seh-rt_v6-rev0\\mingw64\\bin\\gdb.exe", /* Modify it to be yourself bin In the catalog gdb.exe, The path here is a little different from the file directory copied in the computer , Here are two backslashes \\*/
"setupCommands": [
{
"description": " by gdb Enable neat printing ",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "task g++"
}
]
}
(3)tasks.json
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "task g++",
"command": "D:\\vs code\\x86_64-8.1.0-release-posix-seh-rt_v6-rev0\\mingw64\\bin\\g++.exe", /* Modify it to be yourself bin In the catalog g++.exe, The path here is a little different from the file directory copied in the computer , Here are two backslashes \\*/
"args": [
"-g",
"${file}",
"-o",
"${fileDirname}\\${fileBasenameNoExtension}.exe",
"-I",
"D:\\vs code\\first", /* Modify it to put it on your own c/c++ Project folder , The path here is a little different from the file directory copied in the computer , Here are two backslashes \\*/
"-std=c++17"
],
"options": {
"cwd": "D:\\vs code\\x86_64-8.1.0-release-posix-seh-rt_v6-rev0\\mingw64\\bin" /* Modify it to be yourself bin Catalog , The path here is a little different from the file directory copied in the computer , Here are two backslashes \\*/
},
"problemMatcher":[
"$gcc"
],
"group": "build",
}
]
}
To write C/C++ Program and run
The next project file created above helloWorld.cpp You can write the corresponding C/C++ Program , Take the output as an example .
#include <stdio.h>
#include <windows.h>
int main()
{
printf("Hello World\n");
system("pause");
return 0;
}

follow-up : In the process , Also encountered many problems . It's exciting to compile successfully step by step , If you have any questions, you can actively comment and learn from each other .launch:program“ route ”does not exist as well as preLaunchTask“g++“ Has terminated and many other problems , I've also encountered it this time . There is another important correction :
边栏推荐
- WhatsApp web for usability testing of software testing technology
- Interview questions
- Digital signal processing synthesis matlab design of dual tone multi frequency dialing system
- Unity3d calls between different script functions or parameters
- What is iftmcs indicating contract status message?
- Harbor installation
- Codeworks round 651 (Div. 2) ABCD solution
- After burning up 130 billion yuan in ten years, vertical e-commerce will eventually enter the dust of history
- If in ython__ name__ == ‘__ main__‘: Function and principle of
- Dynamic kubernetes cluster capacity expansion of airbnb
猜你喜欢

Document the use of anti shake in packaged components and projects
![[C + + primer notes] Chapter 8 IO Library](/img/84/53cca8bb00b392c74b5dfe039da711.png)
[C + + primer notes] Chapter 8 IO Library

Esp32 OLED lvgl displays common Chinese characters

Pads copper laying

C # "learning code snippet" - recursively obtain all files under the folder

Introduction to thread pool

The first meta universe auction of Chen Danqing's printmaking works will open tomorrow!

Vegetable greenhouses turned into smart factories! Baidu AI Cloud helps Shouguang, Shandong build a new benchmark for smart agriculture

BisinessCardGen
![Yolov7:oserror: [winerror 1455] the page file is too small to complete the final solution of the operation](/img/e1/51f750d355b248ab84e10f0e134271.png)
Yolov7:oserror: [winerror 1455] the page file is too small to complete the final solution of the operation
随机推荐
The IPO of Tuba rabbit was terminated: the annual profit fell by 33%, and Jingwei Sequoia was the shareholder
Chapter IV drive subsystem development
Verification of Kirchhoff's law and Multisim Simulation (engineering documents attached)
BisinessCardGen
Cloud native observability tracking technology in the eyes of Baidu engineers
Tiktok iqiyi announced cooperation, long and short video handshake and reconciliation?
360 interview summary 2013 campus recruitment 2012-4-4
What is the root password of MySQL initial installation
Tool use of rookie tutorial -- View subclass (implementation class) class diagram in idea
Latex notes
Measurement and Multisim Simulation of volt ampere characteristics of circuit components (engineering documents attached)
What are the functions of rank function
Is qiniu Business School reliable? Is it safe to open Huatai account recommended by the lecturer
Automated test series selenium three kinds of waiting for detailed explanation
如何创建索引
What is iftmcs indicating contract status message?
Multi table query of SQL
Unity panel control
Breederdao's first proposal was released: the constitution of the Dao organization
Invitation letter | "people, finance, tax" digital empowerment, vigorously promote retail enterprises to achieve "doubling" of economies of scale