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

相关推荐
汉克老师几秒前
GESP6级C++考试语法知识(十七、数据结构(三、认识队列 Queue))
数据结构·c++·队列·gesp6级·gesp六级·数组模拟队列
枕星而眠1 小时前
Linux 四大进程/线程同步锁详解:互斥锁、读写锁、条件变量、文件锁
linux·c语言·后端·ubuntu·学习方法
社交怪人1 小时前
【数字对调】信息学奥赛一本通C语言解法(题号2070)
c语言·开发语言
hef2882 小时前
C语言中char指针与数组的区别及应用
c语言·开发语言
j_xxx404_2 小时前
Linux进程信号捕捉与操作系统运行本质深度解析
linux·运维·服务器·开发语言·c++·人工智能·ai
vx-程序开发2 小时前
基于机器学习的动漫可视化系统的设计与实现-计算机毕业设计源码08339
java·c++·spring boot·python·spring·django·php
__Benco2 小时前
创建一个 Linux5.10 普通 kill 无效的守护进程 Daemon-demo
c语言
啊董dong3 小时前
noi-2026年5月12号小测验
数据结构·c++·算法
咩咦4 小时前
C++学习笔记24:构造函数初始化列表
c++·学习笔记·类和对象·构造函数·初始化列表·const引用
为何创造硅基生物4 小时前
C 语言 typedef 结构体私有化
c语言·开发语言·算法