已配置launch.json和tasks.json
PS C:\Users\16134\Desktop\约化重力
> cd "c:\Users\16134\Desktop\约化重力\" ; if ($?) { gfortran hello.f90 -o hello } ; if ($?) { .\hello }
gfortran : The term 'gfortran' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:47
+ cd "c:\Users\16134\Desktop\约化重力\" ; if ($?) { gfortran hello.f90 -o h ...
+ ~~~~~~~~
+ CategoryInfo : ObjectNotFound: (gfortran:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
看起来是 gfortran 未被识别。确认一下:1、是否安装gfortran;2、是否正确配置环境变量。
参考GPT和自己的思路:
根据你提供的信息,错误原因是由于 gfortran 命令无法被识别。这个问题需要检查以下几个地方:
希望这些建议能帮助你解决问题。