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.
Hi Sean, > I'm trying to compile NetCDF on MacOS X 10.7.4 with HDF4 and HDF5 support, > and I'm getting the following error message when I run make check: > > libtool: link: gcc -g -O2 -o .libs/tst_interops2 tst_interops2.o > ../liblib/.libs/libnetcdf.dylib -L/Users/seancrowell/local/lib > /Users/seancrowell/local/lib/libhdf5_hl.dylib > /Users/seancrowell/local/lib/libhdf5.dylib -lm -lz -lcurl > Undefined symbols for architecture x86_64: > "_SDstart", referenced from: > _main in tst_interops2.o > "_SDcreate", referenced from: > _main in tst_interops2.o > "_SDwritedata", referenced from: > _main in tst_interops2.o > "_SDendaccess", referenced from: > _main in tst_interops2.o > "_SDend", referenced from: > _main in tst_interops2.o > "_SDsetdimname", referenced from: > _main in tst_interops2.o > "_SDgetdimid", referenced from: > _main in tst_interops2.o > ld: symbol(s) not found for architecture x86_64 > collect2: ld returned 1 exit status > make[2]: *** [tst_interops2] Error 1 > make[1]: *** [check-am] Error 2 > make: *** [check-recursive] Error 1 > > I have a sneaking suspicion that this is related to HDF4, but I'm not sure. Are you running configure with the "--enable-hdf4" option, so you can access some HDF4 files that are not netCDF files? If so, you need to specify the location for the HDF4 header files and library in the CPPFLAGS and LDFLAGS options or environment variables to the configure script, to create Makefiles that incorporate that information. Otherwise, you should omit --enable-hdf4 as a configure option. --Russ > Sean > > > ====================================== > Sean Crowell > Postdoctoral Research Associate > College of Atmospheric and Geographic Sciences > University of Oklahoma > Office: NWC 5420 > Phone: (405)325-1089 > address@hidden<mailto:address@hidden> > > > > > > > Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: JHU-572616 Department: Support netCDF Priority: Normal Status: Closed