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

相关推荐
j_xxx404_1 小时前
Linux:静态链接与动态链接深度解析
linux·运维·服务器·c++·人工智能
xskukuku2 小时前
VSCode中的Codex插件如何调用第三方API
vscode·ai·codex
c++之路2 小时前
C++23概述
java·c++·c++23
leo__5203 小时前
IEC 104 协议 C 语言实现
c语言·数据库
学涯乐码堂主4 小时前
有趣的“打擂台算法”
c++·算法·青少年编程·gesp
云栖梦泽5 小时前
Linux内核与驱动:14.SPI子系统
linux·运维·服务器·c++
Gary Studio5 小时前
安卓HAL C++基础-智能指针
开发语言·c++
还是阿落呀5 小时前
基本控制结构2
c++
啧不应该啊5 小时前
Day1 Python 与 C 的类型区别
c语言·开发语言
多思考少编码5 小时前
PAT甲级真题1001 - 1005题详细题解(C++)(个人题解)
c++·python·最短路·pat·算法竞赛