[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[netCDF #TKL-257790]: NetCDF Fortran Compiler
- Subject: [netCDF #TKL-257790]: NetCDF Fortran Compiler
- Date: Wed, 04 Apr 2007 20:59:54 -0600
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