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

Re: [netcdfgroup] Static netcdf libraries compiled for



Hi Sarah,

> I'm a novice compiler, so I'm not precisely sure what is hanging me up,
> but I'm battling the "error LNK2001 (or 2019): unresolved external
> symbol _(insert your favorite version 2.4 variable here)_ referenced in
> function _putcdf_ (or _tscdf_)"
>
> putcdf.f and tscdf.f are fortran code files written by Hydroqual to
> write netcdf data.=20
>
> I would appreciate any insight and guidance you might be able to give.

The current version of netCDF (3.6.2) still includes and supports all
the netCDF version 2 Fortran-77 interfaces, so if you can successfully
build netCDF from the freely available source available from the web
site, you should be able to link against it.

Until the Fortran-2003 standard is widely supported by Fortran
compilers, there is no standard for calling C functions from Fortran
programs, which is how the netCDF Fortran interfaces are implemented.
Various Fortran/C interface combinations are parametrized in the
"cfortran.h" file that is included in the netCDF source distribution.

Depending on your Windows development environment, building netCDF from
source can be more or less difficult.  For example, if you use gcc and
gfortran version 4.2 installed on Windows XP with the cygwin
environment, setting the environment variable CPPFLAGS=-DpgiFortran will
cause the right combination of cfortran.h macros to be used and its
reported that everything works.

--Russ
_____________________________________________________________________

Russ Rew                                         UCAR Unidata Program
address@hidden                     http://www.unidata.ucar.edu