This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: problem with gfortran: gmtime
- From: Daniel Franke <franke dot daniel at gmail dot com>
- To: fortran at gcc dot gnu dot org
- Cc: Seth Linden <linden at ucar dot edu>, Gerry Wiener <gerry at ucar dot edu>
- Date: Thu, 14 May 2009 17:48:39 +0200
- Subject: Re: problem with gfortran: gmtime
- References: <4A0C3BFB.5090708@ucar.edu>
On Thursday 14 May 2009 17:42:51 Seth Linden wrote:
> My name is Seth Linden and I am a software engineer at the National
> Center for Atmospheric Research. I am trying to compile some code with
> gfortran and I am getting an error indicating it does not recognize the
> function gmtime. We have tried linking some additional intrinsic
> libraries and nothing seems to work. What intrinsic library do I need
> to include to get gfortran to recognize gmtime?
Since GMTIME is provided as intrinsic subroutine (GNU extension), there's no
need to link anything in addition.
If you error is something like "undefined reference 'gmtime_'", then your code
very likely contains "EXTERNAL GMTIME" somewhere. Remove it and you are set.
If there's another error, it's hard to tell the reason without (a) the actual
error message and (b) the code issuing that warning (a minimal example
exhibiting the error preferred) and (c) the compiler version and the
command-line options used.
HTH
Daniel
P.S. The documentation might help as well:
http://gcc.gnu.org/onlinedocs/gfortran/GMTIME.html