[英]Git Bash build doesn't work from terminal in VS Code
I have a fresh install of Windows 10 - 64bit 我重新安装了Windows 10-64位
The command I am using is: 我正在使用的命令是:
g++ --version
It doesn't work from using the terminal inside VSCode. 使用VSCode内的终端无法正常工作。
However running bash window outside of VSCode, it works fine. 但是在VSCode之外运行bash窗口,效果很好。 Anybody know any suggestions on how to fix it?
有人知道如何解决它的任何建议吗?
GitBash In VSCode VSCode中的GitBash
Thanks, Ciaran 谢谢,西亚兰
Compare the PATH from your bash outside VSCode: 比较来自VSCode之外bash的PATH:
echo $PATH
And make sure to get the same PATH in your bash within VSCode: 并确保在VSCode中的bash中获得相同的PATH:
export PATH=/the/path/you/see/in/the/previous/step
Once this test is working, check in your VSCode bash where your $HOME is, and modify your ~/.bashrc
in order to set that PATH, as advised in Microsoft/vscode issue 24989 . 测试成功后,请在$ Code所在的VSCode bash中签入,并按照Microsoft / vscode问题24989中的建议修改
~/.bashrc
来设置该PATH。
The OP adds in the comments : OP 在注释中添加:
after leaving and coming back to it the next day.
离开后,第二天再回来。 It is now working.... Must of needed a restart or something?
它现在正在工作。...是否需要重新启动?
This is expected: if the PATH was modified first, the existing process did not inherit immediately that change. 这是可以预期的:如果先修改PATH,则现有进程不会立即继承该更改。 Closing/re-oppening everything would work however.
关闭/重新装箱一切正常。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.