简体   繁体   English

C++ 为什么找不到 MSYS2 MINGW UCRT x64 gdb 命令

[英]C++ Why is MSYS2 MINGW UCRT x64 gdb command not found

So I tried to check Mingw-w64 tools are correctly installed and gcc, g++ were correctly installed but gdb wasn't.因此,我尝试检查 Mingw-w64 工具是否已正确安装,gcc、g++ 是否已正确安装,但 gdb 是否已正确安装。 I'm planning to usE Visual studio code in windows 10. In the https://code.visualstudio.com/docs/cpp/config-mingw#_run-helloworldcpp , it said to match PATH entry but when I went to C:\msys64\mingw64\bin directory, the file was empty.我打算在 windows 10 中使用 Visual studio 代码。在https://code.visualstudio.com/docs/cpp/config-mingw#_run-helloworldcpp中,它表示匹配 PATH 条目但是当我转到 C 时: \msys64\mingw64\bin 目录,文件为空。 Did I miss something or how do I know the correct path to put in the environment variable?我错过了什么或者我怎么知道放入环境变量的正确路径?

I tried C:\msys64\mingw64\bin as both user variable & system variable path but it won't work.我尝试将 C:\msys64\mingw64\bin 作为用户变量和系统变量路径,但它不起作用。 and it said command not found.它说找不到命令。

This is what it said.这就是它所说的。 $ gdb --version $ gdb --版本

bash: gdb: command not found bash:gdb:找不到命令

Try installing GDB by running this in your Bash shell:尝试通过在您的 Bash shell 中运行以下命令来安装 GDB:

pacman -S $MINGW_PACKAGE_PREFIX-gdb

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM