I think Elena made the point that perhaps I should not be using h5cc, but that other users might find it useful. In other words, netCDF-4 is not the typical HDF5 user, so perhaps you don't want to generalize any netCDF-4 solution to the broader HDF5 community. Let's explore the issue of not using h5cc, and see how difficult it would be. To compile I need -I paths (for include files), -L paths (for library files), and the names of the libraries. Is it true that there is more than one library involved?
I think the correct answer is "it depends on how HDF5 was configured". It could have hdf5_hl, zlib, and szlib. In the future there will likely be even more options. If and when nc4 uses the H5DS API, it will always need the hdf5_hl.