MinGW gfortran compilation error: "Unrecognized option '-plugin' "
MinGW gfortran compilation error: "Unrecognized option '-plugin' "
我正在尝试在我的 windows 机器上启动 Fortran 编译器和 运行,但由于某种原因我无法让它工作。我已经安装了最新 MinGW 的 "Basic setup" 部分,我正在尝试编译一个简单的 "Hello world" 程序,但我收到以下错误消息:
C:\MinGW>gfortran -o executable Hello.f90
c:/mingw/bin/../lib/gcc/mingw32/8.2.0/../../../../mingw32/bin/ld.exe: unrecognized option '-plugin'
c:/mingw/bin/../lib/gcc/mingw32/8.2.0/../../../../mingw32/bin/ld.exe: use the --help option for usage information
collect2.exe: error: ld returned 1 exit status
参考源文件如下:
你好.f90
program Hello
write (*,*) 'Hello, world!'
end program Hello
有人知道问题出在哪里吗?
编辑:
版本信息
C:\Users\Angel>c:/mingw/bin/ld.exe --version
GNU ld version 2.17.50 20060824
Copyright 2005 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License. This program has absolutely no warranty.
您的链接器 (binutils ld
v2.17.50) 对于您的 gfortran
前端来说太旧了,
(v8.2.0
)。 gfortran
传递给 ld
的 -plugin
选项
仅自 ld
v2.21.51.
起才支持链接样板
这意味着您没有连贯的 gfortran
工具链。 Binutils v2.17.50 于 2007 年 6 月发布; 2018 年 7 月的 GCC 8.2。
可能您已经在过时的 MinGW 版本之上安装了 gfortran
8.2。
建议您完全删除 MinGW 安装并更换
它与 current mingw-w64 release,其中
你可以 download at Sourceforge.
我正在尝试在我的 windows 机器上启动 Fortran 编译器和 运行,但由于某种原因我无法让它工作。我已经安装了最新 MinGW 的 "Basic setup" 部分,我正在尝试编译一个简单的 "Hello world" 程序,但我收到以下错误消息:
C:\MinGW>gfortran -o executable Hello.f90
c:/mingw/bin/../lib/gcc/mingw32/8.2.0/../../../../mingw32/bin/ld.exe: unrecognized option '-plugin'
c:/mingw/bin/../lib/gcc/mingw32/8.2.0/../../../../mingw32/bin/ld.exe: use the --help option for usage information
collect2.exe: error: ld returned 1 exit status
参考源文件如下:
你好.f90
program Hello
write (*,*) 'Hello, world!'
end program Hello
有人知道问题出在哪里吗?
编辑: 版本信息
C:\Users\Angel>c:/mingw/bin/ld.exe --version
GNU ld version 2.17.50 20060824
Copyright 2005 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License. This program has absolutely no warranty.
您的链接器 (binutils ld
v2.17.50) 对于您的 gfortran
前端来说太旧了,
(v8.2.0
)。 gfortran
传递给 ld
的 -plugin
选项
仅自 ld
v2.21.51.
这意味着您没有连贯的 gfortran
工具链。 Binutils v2.17.50 于 2007 年 6 月发布; 2018 年 7 月的 GCC 8.2。
可能您已经在过时的 MinGW 版本之上安装了 gfortran
8.2。
建议您完全删除 MinGW 安装并更换 它与 current mingw-w64 release,其中 你可以 download at Sourceforge.