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.
> Dear support, > > I compiled zlib, szlib, hdf5 and netcdf4 on Mac OS X 10.5.5 with gcc > and the NAG fortran compiler. > > All builds went well and all 'make check' passed without errors. > > Now I am compiling a package that uses netcdf (climate data operators: > cdo: www.mpimet.mpg.de/~cdo) and the configure script stops with the > error: couldn't find netcdf library > It actually finds the library but the library then does not find some > hdf things: > Undefined symbols: > "_H5Tget_member_offset", referenced from: > _nc4_rec_read_metadata in libnetcdf.a(nc4hdf.o) > "_H5Pset_fclose_degree", referenced from: > _nc_create_file in libnetcdf.a(nc4file.o) > _nc_open_file in libnetcdf.a(nc4file.o) > "_H5T_STD_I16BE_g", referenced from: > _H5T_STD_I16BE_g$non_lazy_ptr in libnetcdf.a(nc4hdf.o) > ... > You need to add to your link options when building applications that use netcdf-4. When compiling the CDO, you need to set LIBS to be -lnetcdf -lhdf5_hl -lhdf5 -lz instead of -lnetcdf. And if you installed HDF5/zlib somewhere different fron netcdf, you will need to provide both locations to the linker with the -L flag. (Which you can do by setting the LDFLAGS environmental variable.) Please let me know if this doesn't help. Thanks, Ed Ticket Details =================== Ticket ID: CGC-382838 Department: Support netCDF Priority: Normal Status: Closed