[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #KNB-625543]: nc-config does not report HDF5 libraries (netcdf 4.3.3.1)

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.


  • Subject: [netCDF #KNB-625543]: nc-config does not report HDF5 libraries (netcdf 4.3.3.1)
  • Date: Wed, 15 Jul 2015 11:21:05 -0600

Hi Alexander,

> I have this bug report concerning build issue of the octave netcdf
> interface.
> https://savannah.gnu.org/bugs/?45406
> 
> NetCDF is build with NetCDF4 support. Should the HDF5 include directory and
> library not be present in the --cflags and the --libs option?

Only id the netCDF library was guilt with the configure option --disable-shared.

When the default shared library is built and installed, it "knows" where to find
the HDF5 library and other libraries such as libz and libcurl that it was built 
with,
so to link with it, you only need to specify -lnetcdf (or -lnetcdff for the 
Fortran 
netCDF library).

> As far as I know, example like on the page [1] rely on the presence of the
> HDF5 library.

Well nc-config still works ok if netCDF is built with --disable-netcdf4, but the
default is to built wth HDF5 and the netCDF-4 functionality it makes possible
by default, assuming the configure script finds the HDF5 library, as specified
with the CPPFLAGS and LDFLAGS environment variables passed to configure.

--Russ

Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: KNB-625543
Department: Support netCDF
Priority: Normal
Status: Closed