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 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