[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[UDUNITS #HVX-351096]: UDUNITS - Error while compiling using udunits.inc


> Institution: Indian Institute of Science
> Package Version: 1.12.4
> Operating System: Linux
> Hardware Information: x86_64
> Inquiry: I have a atmospheric model, which I need to compile against udunits. 
> The compilation fails with the following:
> f77 -c -O3 -I/usr/include/netcdf-3 -I/usr/local/unidata/include udunits.f
> /usr/local/unidata/include/udunits.inc: In function `udunits':
> /usr/local/unidata/include/udunits.inc:32:
> UD_POINTER utmake
> 1                2
> Unrecognized statement name at (1) and invalid form for assignment or 
> statement-function definition
> at (2)
> udunits.f:23:
> timecenters_unit = utmake()
> ^
> Invalid declaration of or reference to symbol `utmake' at (^) [initially seen 
> at (^)]
> make: *** [udunits.o] Error 1
> Please help me out with this. I have attached the udunits.inc and the 
> udunits.f.

Fortran-77 doesn't have a standard "include" mechanism.  The file "udunits.inc"
is, therefore, designed to be included by the C preprocessor and not by any
Fortran compiler.  The file "udunits.f" contains the following

        include '/usr/local/unidata/include/udunits.inc'

Change this to

#include "/usr/local/unidata/include/udunits.inc"

and try again.

Steve Emmerson

Ticket Details
Ticket ID: HVX-351096
Department: Support UDUNITS
Priority: Normal
Status: Closed

NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.