Dear Liu Guangping, > address@hidden:/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. Regards, Steve Emmerson Ticket Details =================== Ticket ID: PPR-301422 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.