level 1
空明白◎
楼主
在命令行可以成功编译并且运行,但在vscode里的终端会报错,错误如下:
PS D:\program\test> g++ test.cpp -o test.exe ; if ($?) { ./test.exe }
g++ : 无法将“g++”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后再试一次。
所在位置 行:1 字符: 1
+ g++ test.cpp -o test.exe ; if ($?) { ./test.exe }
+ ~~~
+ CategoryInfo : ObjectNotFound: (g++:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
请问是为什么,如何解决?
2018年04月28日 14点04分
1
PS D:\program\test> g++ test.cpp -o test.exe ; if ($?) { ./test.exe }
g++ : 无法将“g++”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后再试一次。
所在位置 行:1 字符: 1
+ g++ test.cpp -o test.exe ; if ($?) { ./test.exe }
+ ~~~
+ CategoryInfo : ObjectNotFound: (g++:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
请问是为什么,如何解决?