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

20020813: UDUNITS use on DEC Alpha/OSF1: #ifndef PTR



Yukiko,

>Date: Tue, 13 Aug 2002 17:04:09 +0900
>From: =?iso-2022-jp?B?GyRCSiFFRCEhTSc1KjtSGyhK?= <address@hidden>
>Organization: ?
>To: Steve Emmerson <address@hidden>
>Subject: RE: 20020725: UDUNITS installation: DEC Alpha/OSF1 
>Keywords: 200208130807.g7D87UK12378

The above message contained the following:

> Some days ago, I was helped you to install UDUNUTS on DEC Alpha/OSF1.
> Though I was successful in installing it ,
> as I put calculation into practice, it failed.
> 
> The error mesege is below when I compiled.
> 
> ---------------------------------------------------
> f90: Warning: ./UDUNITS/udunits-1.11.7/include/udunits.inc, line 27: Bad #
> preprocessor line #ifndef PTR
> -^
> f90: Warning: ./UDUNITS/udunits-1.11.7/include/udunits.inc, line 28: Bad #
> preprocessor line #   define PTR  integer
> ---^
> f90: Warning: ./UDUNITS/udunits-1.11.7/include/udunits.inc, line 29: Bad #
> preprocessor line #endif
> -^
> f90: Error: ./UDUNITS/udunits-1.11.7/include/udunits.inc, line 37: Syntax
> error, found END-OF-STATEMENT when expecting one of: ( : % . = =>
> PTR utmake
> ----------------^
> f90: Error: ./UDUNITS/udunits-1.11.7/include/udunits.inc, line 37: This
> statement is positioned incorrectly and/or has syntax errors.
>       PTR utmake
> ----------------^
> 
> If you have anything to suggest me,
> could you tell me them?

The UDUNITS Fortran header file "udunits.inc" is designed to be
preprocessed by the C preprocessor. Your Fortran compiler is not doing
that. Look at the documentation for Fortran compiler and see if there
is an option that will force the compiler to preprocess the file. An
alternative is to try renaming the file to "udunits.F" because some
Fortran compilers will preprocess files that have a ".F" extension. If
you do this, then you will have to change any "#include <udunits.inc>"
lines in your program. Another alternative is to manually preprocess
the file using the C compiler, which will remove the preprocessor
directives.

> Sincerely yours,
> 
> ------------------------------
>   Yukiko Fukuda
>   CTI CO., LTD.
>   e-mail : address@hidden

Regards,
Steve Emmerson   <http://www.unidata.ucar.edu>


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.