当前位置:网站首页>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 :
边栏推荐
- Custom type
- ROS机械臂 Movelt 学习笔记3 | kinect360相机(v1)相关配置
- Join MotoGP Monster Energy British Grand Prix!
- Which automation tools can double the operation efficiency of e-commerce?
- [performance optimization] MySQL common slow query analysis tools
- Human cell prosci 4-1BB ligand recombinant protein scheme
- Codeworks round 649 (Div. 2) ABC problem solution
- 7.15 - daily question - 408
- Uxdb resets the password without knowing the plaintext password
- The troubleshooting process of a segment error (disassembly address troubleshooting)
猜你喜欢

How to empty localstorage before closing a page

7.18 - daily question - 408

Kusionstack open source | exploration and practice of kusion model library and tool chain

How to implement the server anti blackmail virus system is a problem we have to consider

Advanced multithreading (Part 2)

Unity slider slider development

Custom type

How to use measurement data to drive the improvement of code review

Pads copper laying

Notes on topic brushing (XXII) -- Dynamic Planning: basic ideas and topics
随机推荐
7.16 - daily question - 408
MySQL的最左前缀原则
Unity image control and rawimage
Pychart exits pytest mode (run pytest in mode)
Redis pipeline technology / partition
Multi table query of SQL
The position of the nth occurrence of MySQL in the string
[development tutorial 10] crazy shell · open source Bluetooth smart health watch OTA image production and download technical documents
[C + + primer notes] Chapter 8 IO Library
C recursively obtains all files under the folder and binds them to the treeview control
Free personal virtual machine - AWS free EC2 package
Volley7 – networkdispatcher obtains data from the network [easy to understand]
[icore4 dual core core _arm] routine 22: LwIP_ UDP experiment Ethernet data transmission
Fabric. JS centered element
Call camera photo album / upload / scan code in uniapp
The first meta universe auction of Chen Danqing's printmaking works will open tomorrow!
Financial RPA robot enables enterprises to open a new era of intelligence
2012.4.13 360 written examination summary
Automated test series selenium three kinds of waiting for detailed explanation
Example analysis of enum data type in MySQL