VScode C/C++环境配置

1. Download

Visual Studio Code
msys2

2. Setup

2.1 msys2

shell 复制代码
pacman -S --needed base-devel mingw-w64-ucrt-x86_64-toolchain

enter enter

y enter

编辑系统环境变量-->环境变量-->用户环境变量-->Path-->新建-->C:\msys64\ucrt64\bin

cmd

bash 复制代码
gcc --version
g++ --version
gdb --versio
bash 复制代码
C:\Users>gcc --version
gcc (Rev8, Built by MSYS2 project) 15.2.0
Copyright (C) 2025 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

C:\Users>g++ --version
g++ (Rev8, Built by MSYS2 project) 15.2.0
Copyright (C) 2025 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

C:\Users>gdb --versio
GNU gdb (GDB) 16.3
Copyright (C) 2024 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

C/C++ 编译环境安装完毕

2.2 VScode

Chinese (Simplified)

C/C++

3. test

json

相关推荐
拾贰_C3 分钟前
【VSCode | python | anaconda | cmd | PowerShell】在没有进入conda环境时使用conda命令默认安装位置
vscode·python·conda
json{shen:"jing"}4 分钟前
2-C语言的运算符和表达式
c语言·开发语言
.小墨迹32 分钟前
C++学习之std::move 的用法与优缺点分析
linux·开发语言·c++·学习·算法·ubuntu
沪漂的码农35 分钟前
UDS诊断物理层时间参数详解技术文章
c语言·can·uds
看见繁华44 分钟前
C++ 设计模式&设计原则
java·c++·设计模式
点云SLAM1 小时前
C++ error C2065: “M_PI”: 未声明的标识符 解决方案
开发语言·c++·error c2065·m_pi未声明 解决方案
草莓熊Lotso1 小时前
C++11 核心精髓:类新功能、lambda与包装器实战
开发语言·c++·人工智能·经验分享·后端·nginx·asp.net
欧特克_Glodon1 小时前
C++医学图像处理经典ITK库用法详解<三>: 图像配准模块功能
c++·图像处理·vtk·图像配准
黎雁·泠崖1 小时前
【C语言指针精讲】从内存到运算,吃透指针核心逻辑
c语言·开发语言
秦苒&1 小时前
【C语言指针四】数组指针变量、二维数组传参本质、函数指针变量、函数指针数组
c语言·开发语言·c++·c#