我需要使用gfortran来编译依赖于ieee_arithmetic的库。然而,我们发现gfortran无法识别这个模块。
例如,使用代码a.f90
program test
use,intrinsic :: ieee_arithmetic
real :: x
read *, x
if (ieee_is_nan(x)) then
print *, "Nan"
else
print *, "Not NaN"
end if
end program test我在编译时有以下消息
$ gfortran a.f90
a.f90:2.19:
use,intrinsic :: ieee_arithmetic
1
Fatal Error: Can't find an intrinsic module named 'ieee_arithmetic' at (1)我如何让gfortran知道ieee_arithmetic内在模块在哪里?
我们发现ifort能够使用ieee_arithmetic模块。但我想让gfortran为这个案子工作。
发布于 2015-06-10 12:17:38
IEEE模块从GFortran版本5开始就得到了支持。如果您使用的是旧版本,请参阅https://gcc.gnu.org/gcc-5/changes.html,您应该会看到您在文章中显示的错误消息。
https://stackoverflow.com/questions/30747019
复制相似问题