当前位置:网站首页>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 :
边栏推荐
- Interview questions
- 第四章 驱动子系统开发
- Vscode installation and configuration
- "Usaco2006nov" corn fields solution
- Example analysis of recombinant monoclonal antibody prosci CD154 antibody
- Prosci 14-3-3 (phosphate ser58) antibody instructions
- [28. Maximum XOR pair]
- mysql初次安装的root密码是什么
- MySQL series | log module
- Unity panel control
猜你喜欢

MySQL series | log module

Example analysis of recombinant monoclonal antibody prosci CD154 antibody

Advanced multithreading (Part 2)

Game partner topic: the cooperation between breederdao and monkeyleague kicked off

The current situation of the industry is disappointing. After working, I returned to UC Berkeley to study for a doctoral degree

Password input box and coupon and custom soft keyboard

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

Unity slider slider development

Fabric. JS centered element

Moonpdflib Preview PDF usage record
随机推荐
Install and configure php5-7 version under centos7.4
Sort out some scattered knowledge points by yourself
ROS manipulator movelt learning notes 3 | kinect360 camera (V1) related configuration
BGP machine room and BGP
What are the functions of rank function
Dpdk based basic knowledge sorting-01
Educational codeforces round 89 (rated for Div. 2) ABC problem solution
Method properties of ASP adodb.stream object
Harbor installation
[26. String hash]
第四章 驱动子系统开发
2012.4.13 360 written examination summary
Example analysis of recombinant monoclonal antibody prosci CD154 antibody
What is iftmcs indicating contract status message?
Unity slider slider development
JS convert pseudo array to array
Where is the most formal account opening for futures trading? Capital security?
Invitation letter | "people, finance, tax" digital empowerment, vigorously promote retail enterprises to achieve "doubling" of economies of scale
Password input box and coupon and custom soft keyboard
Windows security hardening -- close unnecessary ports