首先打开用户设置,搜索"terminal.integrated.profiles.windows",找到一个列表: 为了使用UCRT64的bash,添加如下配置(因为我还有用MINGW的需求,下面还有MINGW的配置): "bash (MSYS2 UCRT64)": { "path": "C:\\msys64\\usr\\bin\\bash.exe", "args": ["--login", "-i"], "env": { "MSYSTEM": "UCRT...
测试: 重新打开windows terminal, 在 powershell 或是在 msys2 中 输入gcc --version回车. 给出类似以下输出内容, 则认为是环境建立成功. 如果出现以下内容, 一可能是环境变量没有配好, 二可能是没有安装mingw-w64-ucrt-x86_64-toolchain重新查看相关内容, 进行修改. 如果仍然出现问题, 请评论区发言附上截图, ...
最后,设置 MSYS2_PATH_TYPE 环境变量为 inherit,以在 msys2 中使用 windows 工具。测试环境配置 在 windows terminal 中输入 gcc --version,若显示版本信息则表示环境配置成功。若出现环境配置错误,检查环境变量是否正确设置,或重新安装 msys2 和 mingw-w64-ucrt-x86_64-toolchain。
配置Windows Terminal 使用 msys2 bash# 核心参数: 名称:msys2 命令行:C:\msys64\usr\bin\bash.exe icon: C:\msys64\msys2.ico {"guid":"{1c4de342-38b7-51cf-b940-2309a097f589}","hidden":false,"name":"Bash","commandline":"C:\\msys64\\usr\\bin\\bash.exe","historySize":9001,"closeOn...
把msys2集成到Windows Terminal中 将下方的json配置添加到profile.defaults.list中 { // MSYS2 "guid":"{0caa0dad-35be-5f56-a8ff-afceeeaa6301}", "name":"MSYS2", "commandline":"C:\\tools\\msys64\\msys2_shell.cmd -msys -defterm -no-start", ...
-mingw32 | -mingw64 | -ucrt64 | -clang64 | -msys[2] 选择我们要启用的Shell类型,也就是我们要使用的工具环境,目前来说官方最推荐使用ucrt64环境。 -defterm | -mintty | -conemu 选择我们要使用的终端类型。 -defterm是“Default Terminal(默认终端)”的缩写,一般来说使用的就是我们在输入这段命令时...
安装完成后,您可以在 MSYS2 终端中使用 cmake 命令。如果您想在 Windows 命令提示符或 PowerShell 中使用 CMake,您需要将 MSYS2 的 bin 目录添加到系统的 PATH 环境变量中。默认情况下,这个目录的路径是 C:\msys64\usr\bin。 ASUS@LAPTOP-0R30I78P UCRT64 ~ ...
The terminal window will show the output as below. Press 'Enter' to continue: resolving dependencies... looking for conflicting packages... Packages (15) mingw-w64-ucrt-x86_64-binutils-2.41-2 mingw-w64-ucrt-x86_64-crt-git-11.0.0.r216.gffe883434-1 mingw-w64-ucrt-x86_64-gcc-libs-13....
打开VS Code的设置(快捷键Ctrl+,),搜索terminal.integrated.profiles.windows,并添加以下配置: json "terminal.integrated.profiles.windows": { "bash (MSYS2)": { "path": "C:\\msys64\\usr\\bin\\bash.exe", "args": ["--login", "-i"], "env": { "CHERE_INVOKING": "1" } } }, "...
编辑 /etc/pacman.d/mirrorlist.mingw64 ,在⽂件开头添加:Server = https://mirrors.tuna.tsinghua.edu.cn/msys2/mingw/x86_64 编辑 /etc/pacman.d/mirrorlist.ucrt64 ,在⽂件开头添加:Server = https://mirrors.tuna.tsinghua.edu.cn/msys2/mingw/ucrt64 编辑 /etc/pacman.d/mirrorlist.clang64 ,...