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, After you built netCDF 3.6.2 from source, did you also install it by invoking "make install"? The default location for installing netCDF is not /usr/local/ACCESS/, so if you built and installed it, presumably you must have explicitly specified --prefix=/usr/local/ACCESS as an argument to the configure script, or the library in /usr/local/ACCESS/lib/ is not the one you built. By using "ls -l /usr/local/ACCESS/lib/libnetcdf.a" you could find out when that library file was installed, and if it turns out to be before you built the library, that might indicate what the problem is. By invoking "file /usr/local/ACCESS/lib/libnetcdf.a" you would see what kind of file MAC OS X thinks it is. If it's built for the architecture you are using, it should just report "current ar archive". > Should I be using a different link symbol (besides -lnetcdf -lnsl) > to link to the libnetcdf.a library? Typically you also need to tell the compiler where to look using "-L", for example ... -L/usr/local/ACCESS/lib -lnetcdf and as far as I know "-lnsl" is not necessary for linking netCDF libraries on Mac OS X, but it shouldn't cause a problem to specify an unneeded library. --Russ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: NVK-272087 Department: Support netCDF Priority: Normal Status: Closed