This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Hi Steve, I think you just need to specify the libraries last on the gfortran invocation, because gfortran (and most other compilers when used to link objects and libraries) are sensitive to the order of arguments. So instead of: gfortran -Wall -I/usr/local/include -L/usr/local/lib -lnetcdf -o ZonalAverage ZonalAverage.f90 try gfortran -Wall -I/usr/local/include -o ZonalAverage ZonalAverage.f90 -L/usr/local/lib -lnetcdf --Russ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: KMB-390308 Department: Support netCDF Priority: Normal Status: Closed