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.
>To: address@hidden >From: Brian Rizzo <address@hidden> >Subject: Re: 980306: compile problem >Organization: Department of Environmental Sciences, University of Virginia >Keywords: 199803061746.KAA28435 Hi Brian, > I figured this out earleir and replaced df with fl32 the ms compile > command. During execution two errors repeatedly recurred. The first > reproted a problem with lines like these found in ftest.f. > > NCSHORT_T svalidrg(2) > NCBYTE_T bvalidrg(2) > > The compiler complained about NCSHORT_T and NCBYTE_T. They are defined > earleir as integer, I am now clueless as to what the problem is. These are defined in src/fortran/nfconfig.inc, which is a file we generate and use for solving portability problems during netcdf building and testing, but you should not have to include it in any of your source code. The intent is that NCSHORT_T is replaced by whatever type corresponds to 2-byte integer (integer*2 for example) and NCBYTE_T similarly corresponds to 1-byte integers, but you should not encounter the above macros in your code, and they are not a documented part of the public interface. > I am trying to get this to work so I can get gennet.f to work. This > is a fortran program the generates fortran programs to read netcdf > files. It's on the net in te user contribution section. The proble I > am having there is the none of the symbols are being found. I have > =netcdf.inc included adn have the .lib file in the directory as well > but the message continues. The source for gennet.f at ftp://ftp.unidata.ucar.edu/pub/netcdf/contrib/gennet.f does not contain either of the symbols NCSHORT_T or NCBYTE_T, so I don't understand how they relate to getting that program to work. It's possible that your Fortran compiler fl32 does not handle source code for Fortran that requires the C preprocessor (for example, #include, #define, and #ifndef statements), which is what is expected for compiling code such as "ftest.F" in the Fortran directory. In this case, you will need to determine from the compiler documentation what flags to use or invoke the C preprocessor explicitly to get this to work. But note that the "netcdf.inc" include file, which is all you should need to use the Fortran interface, does *not* require the C preprocessor. --Russ _____________________________________________________________________ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu