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

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

Dear Liu Guangping,

> root@lgp-laptop:/usr/local/src/udunits/include# g77 -I readfeneral.F
> /usr/lib/gcc/i486-linux-gnu/3.4.6/../../../../lib/libfrtbegin.a(frtbegin.o): 
> In function `main':
> (.text+0x35): undefined reference to `MAIN__'
> collect2: ld returned 1 exit status

There are several things about the build-command that concern me:

1) It appears to be executed in the "include" directory of the
UDUNITS package instead of a source-directory of the package that
contains the file "readgeneral.F".

2) The "-I" option doesn't reference the UDUNITS include-directory.
For example: "-I/usr/local/src/udunits/include".

3) The command doesn't reference the UDUNITS library.  For example:
"-L/usr/local/src/udunits/lib -ludunits".

4) The command doesn't reference the netCDF packge, which is necessary
for the "readgeneral" program, I think.  For example:
"-I/usr/local/src/netcdf/include -L/usr/local/src/netcdf/lib -lnetcdf".

Please go the directory that contains the "readgeneral.F" file
and execute something like the following command:

g77 -o readgeneral readgeneral.F -I/usr/local/src/udunits/include \
-I$NETCDF_ROOT/include -L/usr/local/src/udunits/lib -ludunits \
-L$NETCDF_ROOT/lib -lnetcdf

where $NETCDF_ROOT is the root-directory of your netCDF installation.

Redirect the standard output and standard error streams to a
file and send me the file if the command fails.

Steve Emmerson

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