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.
Vivian, > > This bug in the C++ interface was fixed by the patch number 4 for netCDF > > 2.3.2. You can obtain this patch from > > > > ftp://ftp.unidata.ucar.edu/pub/netcdf/2.3.2-patch4 > > > > or you can get an already-patched version of the whole source distribution > > from > > > > ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-232pl4.tar.Z > > Well, we got the already-patched version of the whole source distribution, > but it gives us the following compiler error when we try to make library > from the c++ directory: > > kiwi:chao> make library > CC -c -g -I../libsrc netcdf.cc > CC: "ncvalues.hh", line 20: error: ncbyte redefined: typedef char and > typedef unsigned char (1695) > make: *** [netcdf.o] Error 1 > > We are using the HP 700 series c++ compiler and the HPUX 9.05 OS. Which > typedef should we remove? We have both c and c++ netcdf users. You have to run the "configure" script first before running "make", so that libsrc/netcdf.h gets created from libsrc/netcdf.h.in. The libsrc/netcdf.h that is included in the patched distribution appears to be an old version containing the erroneous typedef for ncbyte that was supposedly corrected with patch 3. There should be no typedef for ncbyte in netcdf.h, just in netcdf.hh. As it says in the comments at the top of the source for patch 4: Note that after applying patch3, you *must* remake the netCDF library from scratch (from the `configure' step), because the libsrc/netcdf.h file is regenerated by the `configure' script from one of the files changed by this patch. I'm sorry about the complexity of building netCDF after these patches, but we're currently preparing netCDF version 2.4 that will have these problems fixed (and probably introduce interesting new problems :-). I just tried building from netcdf-232pl4.tar.Z on an HP-UX 9.05 system beginning with the "configure" step, and it worked fine. --Russ ______________________________________________________________________________ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu