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, With gfortran, you need to use the -L argument to tell it in which directory to find the library or DLL and the -l argument to tell gfortran what library to use in that directory. So if you installed the libraries netcdf in /usr/local/lib, then you would use gfortran options such as gfortran -I/usr/local/include simple_xy_wr.f -L/usr/local/lib -lnetcdf The gfortran compiler you're using is looking for Fortran routine names with a single appended underscore. I'm not sure which DLL you're using, but the two we have available use different conventions for constructing names in the Fortran interface, so if you're invoking gfortran with the right arguments, you might try the other one. The ones I know a little about are: ftp://ftp.unidata.ucar.edu/pub/netcdf/contrib/win32/win32_ifort_dll.tar.gz and ftp://ftp.unidata.ucar.edu/pub/netcdf/contrib/win32/win32_pgi_dll.tar.gz but I'm not sure which one uses appended single underscores. I'm CC:ing Ed who can tell you if this is right. Your other concern was about using the F77 interface from F90. That should not be a problem, since F90 programs can call F77 libraries and an F77 program is also an F90 program. In fact, the F90 netCDF interface is implemented by calling above the F77 netCDF interface currently, so compatibility is assured. --Russ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: TKL-257790 Department: Support netCDF Priority: High Status: Closed