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.
Rich, > For some reason nc-config did not get installed in the specified > directory where ncdump and ncgen went (/usr/local/gfortran/bin), but > running this in the source directory for netcdf 4.1.1 produced this: > > $ ./nc-config --flibs > -L/usr/local/gfortran/lib -lnetcdf -L/usr/local/gfortran/lib -lhdf5_hl > -lhdf5 -L/usr/local/lib -lz -lm -lcurl -lidn -lssh2 -lssl -lcrypto > -lssl -lcrypto -lz > > And sure enough, when I used that, it worked! Sheesh, glad we have > this command, because I don't think I would have come up with that > compile line on my own. ;-) It's possible the nc-config you're using was for a different buid of netCDF that didn't specify --disable-netcdf4, because you should not need -lhdf5_hl or -lhdf5 for a library without netCDF-4. It might work fine if you just delete those. Most of the other libraries are just needed for the OPeNDAP client support. "-L/usr/local/gfortran/lib -lnetcdf". --Russ If you build with --enable-shared, linking can get dramatically simpler, as the dynamically loaded libraries "know" what they depend on, so you don't have to. With a shared build, you might only need > Thanks! > -Rich > > > > Also, if you installed nc-config along with the other netCDF utilities > > like ncgen and ncdump, you should look at the output from > > > > nc_config --flibs > > > > which will show how Fortrna programs should be linked with your > > installation. > > > > If none of these solve the problem, please let us know ... > > > > --Russ > > > > Russ Rew UCAR Unidata Program > > address@hidden http://www.unidata.ucar.edu > > > > > > > > Ticket Details > > =================== > > Ticket ID: CAF-785846 > > Department: Support netCDF > > Priority: Normal > > Status: Closed > > > > > > > > -- > Dr. Richard P. Signell (508) 457-2229 > USGS, 384 Woods Hole Rd. > Woods Hole, MA 02543-1598 > > Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: CAF-785846 Department: Support netCDF Priority: Normal Status: Closed