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

相关推荐
cmpxr_13 分钟前
【C】数组名、函数名的特殊
c语言·算法
会编程的土豆30 分钟前
【数据结构与算法】再次全面了解LCS底层
开发语言·数据结构·c++·算法
低频电磁之道33 分钟前
解决 Windows C++ DLL 导出类不可见的编译错误
c++·windows
itman3012 小时前
C语言怎么学?从写程序到玩指针的实操攻略
c语言·指针·结构体·编程学习·资源推荐
君义_noip2 小时前
信息学奥赛一本通 4150:【GESP2509七级】⾦币收集 | 洛谷 P14078 [GESP202509 七级] 金币收集
c++·算法·gesp·信息学奥赛·csp-s
Ricky_Theseus2 小时前
静态链接与动态链接
c++
澈2073 小时前
双指针,数组去重
c++·算法
小辉同志3 小时前
207. 课程表
c++·算法·力扣·图论
kang_jin3 小时前
C语言结构体入门:stu定义与成员使用
c语言·教程·编程语言·入门·结构体
feng_you_ying_li3 小时前
C++11,{}的初始化情况与左右值及其引用
开发语言·数据结构·c++