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

[UDUNITS #PPR-301422]: Help,how to install install UDUNITS

Dear Liu Guangping,

> The attachment is the error files.The 'readgeneral_error_f' is corresponding 
> to 'readgeneral.f'.The 'readgeneral_F_error' is corresponding to 
> 'readgeneral.F'.
> The 'readgeneral.F' is '#include<unidints.inc>'.
> The 'readgeneral.f'is 'include '/usr/local/src/netcdf/include/netcdf.inc''.

The output from attempting to compile and link the file readgeneral.F
contained the following:

root@lgp-laptop:/host/ubuntufiles/download# g77 -o readgeneral readgeneral.F 
-I/usr/local/src/udunits/include \-I/usr/local/src/netcdf/include 
-L/usr/local/src/udunits/lib -ludunits \-L/usr/local/src/netcdf/lib -lnetcdf

readgeneral.F: In subroutine `gridread':


           #include <udunits.inc>


Unrecognized character at (^) [info -f g77 M LEX]

This error means that the g77(1) compiler did not recognize the
cpp(1) include-directive.  According to the g77(1) 3.4.6 manual
page, UNIX files which have a capital "F" extension will be
preprocessed by cpp(1).  Because this was not done, either the
operating system is not UNIX, the command given is not the one
that was used, or there is something wrong with your g77 3.4.6
installation or my understanding of it (it is possible, for
example, that any "-I..." option must come before the input
source file).

Try preprocessing the file manually.  For example

g77 -v -E -I/usr/local/src/udunits/include -I/usr/local/src/netcdf/include 
readgeneral.F > readgeneral.f
g77 -v -o readgeneral readgeneral.f -L/usr/local/src/udunits/lib -ludunits 
-L/usr/local/src/netcdf/lib -lnetcdf

> Thank you!Regards,liuguangping
> _________________________________________________________________
> 新年换新颜,快来妆扮自己的MSN给心仪的TA一个惊喜!
> http://im.live.cn/emoticons/?ID=18

Steve Emmerson

Ticket Details
Ticket ID: PPR-301422
Department: Support UDUNITS
Priority: Normal
Status: Closed