MinGW 无法通过路径变量识别

发布于 2024-10-06 08:26:21 字数 279 浏览 0 评论 0原文

Windows 7 中的 Eclipse CDT 显示如下警告: 启动外部扫描仪信息生成器时出错(g++ -E -P -v -dD C:/Users/User/workspace/.metadata/.plugins/org.eclipse.cdt.make.core/specs.cpp)

所以我已经设置了将环境变量路径设置为 C:\MinGW\bin,但如果我在 cmd 中键入 gcc --version,则无法识别该命令。但是,如果我将目录更改为 C:\MinGW\bin,它就可以正常工作。

提前致谢。

Eclipse CDT in Windows 7 is showing warnings like this:
Error launching external scanner info generator (g++ -E -P -v -dD C:/Users/User/workspace/.metadata/.plugins/org.eclipse.cdt.make.core/specs.cpp)

So I already set the path environment variable to C:\MinGW\bin, but if i type gcc --version in cmd the command is not recognised. However, if I change the directory to C:\MinGW\bin, it works fine.

Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

Hello爱情风 2024-10-13 08:26:21

您可以在 cmd 窗口中键入“path”以查看有效的路径(确保您向路径变量附加了一个值并且没有完全替换它,没有空格等)

如果打开一个新的 cmd 或重新启动没有帮助,您可以使用 进程监视器 和过滤器“进程名称是 cmd.exe”以查看 cmd.exe 到底在哪里查找 gcc 以及它失败的原因。

You can type "path" in the cmd window in order to see the path that's in effect (make sure you appended a value to the path variable and didn't replace it entirely, no spaces, etc.)

If opening a new cmd or reboot doesn't help, you can use process monitor with a filter of "process name is cmd.exe" to see where exactly cmd.exe looks for gcc and why it is failing.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文