[netcdfgroup] netcdf.h declares non-existing functions

Hi,

since netcdf-4.1.2, the netcdf.h file declares all netcdf4 functions, like nc_def_var_deflate and NC_NETCDF4, even if the library was compiled without hdf5 support, and does not have these functions.

I have code like

#ifdef NC_NETCDF4
  nc_def_var_deflate(...)
#endif

which worked perfectly with netcdf3 and netcdf4 until 4.1.1. Since netcdf 4.1.2, this code compiles still, but when the netcdf-library was not compiled with hdf5 support, the code won't link with the library.


This means, that netcdf since 4.1.2 has a single API, but has different ABIs depending on netcdf-configure flags. I would suggest adding the 'Extra netcdf4 stuff.' function calls to the netcdf3 code, even if they are empty, e.g.

int
nc_def_var_deflate(int ncid, int varid, int shuffle, int deflate,
                   int deflate_level)
{
        return NC_NOERR;
}


Best regards,

Heiko



  • 2012 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: