【问题标题】:fortran 90 gfortran fatal error can't rename module file existsfortran 90 gfortran 致命错误无法重命名模块文件存在
【发布时间】:2014-12-03 20:38:59
【问题描述】:

我正在尝试在 Windows 7 机器上使用 gfortran 编译和运行 fortran 90 代码。

当我使用

编译和链接时
gfortran -I"myDir" -g -Wall -Wextra -pedantic -fimplicit-none -fbacktrace -fcheck=all -Wuninitialized
-Q -J"bin" parametricStudy.f90 -o LDCP

我收到以下错误:

Fatal Error: Can't rename module file 'bin/initializeubcs_mod.mod0' to 'bin/init
ializeubcs_mod.mod': File exists

如果我删除文件夹“bin”中的 mod 文件,那么它可以毫无问题地编译,但我不想每次编译代码时都删除文件夹中的所有 .mod 文件。我该怎么办?

非常感谢任何帮助!

【问题讨论】:

  • 始终使用标签fortran 并且仅在必要时添加版本以区分您的问题是具体的。例如,您不能使用 Fortran 2008,而只能使用 Fortran 90。

标签: module compilation fortran gfortran


【解决方案1】:

如果您使用的是 gfortran 4.9 或 4.9.1,我猜您会被 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62215 所困扰。在这种情况下,请更新到已修复此问题的 4.9.2。

【讨论】:

  • 啊,我认为你是对的。我一确认就接受。谢谢!
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-11-10
  • 2018-09-27
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多