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.
Edin, I think the problem is that you ran configure with "--prefix=/usr/local/include", but what you really intended was "--prefix=/usr/local". With the prefix you specified, the include file would be installed in /usr/local//include/include rather than in /usr/local/include, and you would have to specify #include <include/netcdf.h> instead of #include <netcdf.h> in your programs to see a definition of NC_NETCDF4. You are probably seeing the older netcdf-3 netcdf.h file in /usr/include/netcdf.h, which would not have a definition for NC_NETCDF4. You could check on the dates of the two netcdf.h files with something like ls -l /usr/local/include/netcdf.h /usr/local/include/include/netcdf.h and it will probably show that first was installed earlier than the second. Just rerun "make distclean" and configure with the right --prefix value and it should overwrite the old netcdf.h file from your netcdf-3 installation. --Russ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: LKB-522731 Department: Support netCDF Priority: Normal Status: Closed