当前位置: 首页 > article >正文

Visual Studio Code---介绍

0 Preface/Foreword

1、安装VScode

官网:Download Visual Studio Code - Mac, Linux, Windows

文档:Documentation for Visual Studio Code 

1.1 优点

  1.  Intelligent code completion: code smarter with intellisense - completions for variables, methods, and imported modules.
  2.  Streamlined debugging: Print debugging is a thing of the past. Debug in VS Code with your terminal tools
  3.  Fast, Powerful Editing: Linting, multi-cursor editing, parameters hints, and other powerful editing features
  4.  Code Navigation and refactoring: Browse your source code quickly using peek and navigate to definition
  5.  In-product source control: speed up your release cycle with SCM support inside your editor, including rich Git integration

1.2 添加扩展插件

1.2.1 添加C/C++extension

下载市场,marketplace:C/C++ - Visual Studio Marketplace

C/C++ support for Visual Studio Code is provided by a Microsoft C/C++ extension to enable cross-platform C and C++ development on Windows, Linux, macOS. When you create a *.cpp file, the extension adds features such as syntax highlighting (colorization), smart completions and hovers (IntelliSense), and error checking.

安装扩展步骤:

  1. 打开VS Code(Open VS Code)
  2. 选择在活动条中的扩展功能的可视图标(Select the Extension view icon on the Activity bar or use the keyboard shortcut(ctrl+shift+X))
  3. 搜索 C++(Search for 'C++')
  4. 选择安装(Select Install) 

1.2.2 设置C++环境(set up C++ environment) 

C++ is a compiled language meaning your program's souce code must be translated (compiled) before it can be run on your computer. The C/C++ extension doesn't include a C++ compiler or debugger, since VS Code as an editor relies on command-line tools for the development workflow. You need to install these tools or use those tools already installed on your computer.

检查你是否已经安装了编译器(Check if you have a compiler installed)

Note: There may already be a C++ compiler and debugger provided by your academic or work development environment. Check with your instructors or colleagues ofr guidance on installing the recommended C++ toolset (compiler, debugger, project system, linter). 

Common compilers that already come preinstalled on some platforms are the GNU Compiler Collection (GCC) on Linux and the Clang tools with Xcode on macOS. 

打开终端命令行窗口:

shift+ctrl+`

 使用命令:

g++ version

The output should show you the compiler version and details. If neither are found, make sure your compiler executable is in your platform path (%PATH on Windows, $PATH on Linux and macOS) so that the C/C++ extension can find it. Otherwise, use the instructions in the section below to install a compiler. 

安装MSYS2

注意:安装过程结束后,一定要选择运行UCRT64,否则无法加载mingw-w64-ucrt相关工具。

通过MSYS2安装MinGW64 

 

配置环境变量

 

 

验证mingw-64工具安装完成并且可用 

 


http://www.kler.cn/news/133902.html

相关文章:

  • Android Frgment中onActivityResult无效的问题
  • mysql练习1
  • 多媒体ffmpeg学习教程
  • SDUT OJ《算法分析与设计》贪心算法
  • 23.11.19日总结
  • 【嵌入式 – GD32开发实战指南(ARM版本)】第2部分 外设篇 - 第3章 温度传感器DS18B20
  • 笔记54:门控循环单元 GRU
  • 【Web】Ctfshow SSTI刷题记录1
  • OpenCV快速入门:绘制图形、图像金字塔和感兴趣区域
  • 提升工作效率,打造精细思维——OmniOutliner 5 Pro for Mac
  • ubuntu中用docker部署jenkins,并和码云实现自动化部署
  • flutter TabBar指示器
  • 实在智能携手中国电信翼支付,全球首款Agent智能体亮相2023数字科技生态大会
  • redis问题归纳
  • 八叉树(Octree)和KD树区别?2d tree与3d tree区别?
  • C语言链式栈
  • mac控制台命令小技巧
  • SQLite3 数据库学习(文章链接汇总)
  • 卷积神经网络(VGG-16)海贼王人物识别
  • CSS英文单词强制截断换行
  • 开拓经验专栏:从十来天的晨型人体验开始
  • Linux命令(125)之scp
  • 被锁总时间
  • 数据结构:红黑树的插入实现(C++)
  • 坐标系下的运动旋量转换
  • SingleTreePolicyInterpreter
  • k8s pod 处于Terminating的原因分析和解决处理——筑梦之路
  • 【Go入门】 Go的http包详解
  • QtC++与QUndoView详解
  • lv11 嵌入式开发 ARM指令集中(伪操作与混合编程) 7