REAL_KINDS: a compilation error in Windows but not in Linux ?

Tobias Burnus burnus@net-b.de
Sun Aug 14 15:53:00 GMT 2011


Jorge D'ELIA wrote:
> module m_test
>    use ISO_FORTRAN_ENV
> [...]
>
> C:\Users\TEST\gfortran -Wall -std=f2003 -c m_test.f90 m_test.f90:6.29:
>
>    integer, parameter :: isp = REAL_KINDS (1)
>                               1
> Error: Function 'real_kinds' at (1) has no IMPLICIT type

The error makes perfectly sense: REAL_KINDS is a Fortran 2008 feature - 
thus Fortran 2003's ISO_FORTRAN_ENV does not contain this symbol. Try 
compiling with -std=f2008.

If you had used ONLY, the error message would have helped a bit more:

     use ISO_FORTRAN_ENV, only: real_kinds
                                        1
Error: The symbol 'real_kinds', referrenced at (1), is not in the 
selected standard

Tobias



More information about the Fortran mailing list