&quot'c.lang(LLVM选项解析):未知命令行参数&quot"在Mac上运行GFORTRAN时
我正在尝试编译一个“ Hello World”文本文件,但是在我的Mac终端中继续收到错误:
(base) name@Names-MacBook-Pro-3 File % gfortran -o test.exe try.f90
c.lang (LLVM option parsing): Unknown command line argument '-x86-pad-for-
align=false'. Try: 'clang (LLVM option parsing) --help'.
我的Fortran版本:
GNU Fortran (Homebrew GCC 11.3.0_1) 11.3.0
文本文件(try.f90),我在VS中写了:
program try
print*,'hello world!'
end program try
我尝试了一个空间,没有空间打印。我使用的代码是来自使用Atom Text Editor的YouTuber,该视频是从2020年开始的
。我被卡住了。请帮忙。
I am trying to compile a "hello world" text file, but keep receiving an error in my mac terminal:
(base) name@Names-MacBook-Pro-3 File % gfortran -o test.exe try.f90
c.lang (LLVM option parsing): Unknown command line argument '-x86-pad-for-
align=false'. Try: 'clang (LLVM option parsing) --help'.
My fortran version:
GNU Fortran (Homebrew GCC 11.3.0_1) 11.3.0
text file (try.f90) that I wrote in VS:
program try
print*,'hello world!'
end program try
I tried with a space and without a space before print. The code I am using is from a youtuber who uses Atom text editor and the video is from 2020.
I am stuck. Please help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我遇到了同样的问题,似乎根本原因是
xcode
vs命令行工具
。可能有些不一致(例如,我可能已经升级了CLI,但没有升级GUI)。无论如何,在
我用
按预期工作之前。Homebrew
的gcc-12
FWIW
I faced the same issue and it seems the root cause was
Xcode
vsCommand Line Tools
were used. Probably some inconsistency (e.g. I might have upgraded the cli but not the gui).Anyway, before
I fixed this with
and then
gcc-12
orgfortran
fromhomebrew
worked as expected.FWIW
我通过更新Xcode解决了问题。 Gfortran和Clang之间存在不相容性。要查看可用的更新:
I resolved my issue by updating Xcode. There was an incompatibility between gfortran and clang. To see available updates: