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

相关推荐
我在人间贩卖青春5 小时前
C++之多重继承
c++·多重继承
m0_736919105 小时前
C++代码风格检查工具
开发语言·c++·算法
2301_763472467 小时前
C++20概念(Concepts)入门指南
开发语言·c++·算法
阿猿收手吧!7 小时前
【C++】std::promise原理与实战解析
c++
m0_706653238 小时前
分布式系统安全通信
开发语言·c++·算法
Zach_yuan8 小时前
深入浅出 JSONCpp
linux·服务器·网络·c++
寻寻觅觅☆8 小时前
东华OJ-基础题-104-A == B ?(C++)
开发语言·c++
lightqjx9 小时前
【C++】unordered系列的封装
开发语言·c++·stl·unordered系列
阿猿收手吧!9 小时前
【C++】string_view:高效字符串处理指南
开发语言·c++
Word码10 小时前
[C++语法] 继承 (用法详解)
java·jvm·c++