- To: Heiko Klein <Heiko.Klein@xxxxxx>
- Subject: Re: [netcdfgroup] netcdf.h declares non-existing functions
- From: Doug Hunt <dhunt@xxxxxxxx>
- Date: Thu, 26 Apr 2012 09:16:49 -0600 (MDT)
Hi Heiko: Funny, I'm just trying to get PDL::NetCDF to compile against
netcdf 4.2 and am running into the same problem. It would be nice to not
have to install HDF to get a working netcdf. Some solution like yours (or
just moving netcdf4 functions back out of netcdf.h) would be welcome!
--Doug dhunt@xxxxxxxx Software Engineer UCAR - COSMIC, Tel. (303) 497-2611 On Thu, 26 Apr 2012, Heiko Klein wrote:
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(...) #endifwhich 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 _______________________________________________ netcdfgroup mailing list netcdfgroup@xxxxxxxxxxxxxxxxFor list information or to unsubscribe, visit: http://www.unidata.ucar.edu/mailing_lists/
- References:
- [netcdfgroup] netcdf.h declares non-existing functions
- From: Heiko Klein
- [netcdfgroup] netcdf.h declares non-existing functions