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 Gaby, re: > I made sure I removed any other copies of netcdf from the system. Very good. > What is most frustrating is that > > ifort -g -Iinclude -I/home/turekg/local/include -Llib > -l/home/turekg/local/lib/libnetcdf.a -o a.out *.f90 > > fails with > ld: cannot find -l/home/turekg/local/lib/libnetcdf.a > > but ifort -g -Iinclude -I/home/turekg/local/include -Llib > -L/home/turekg/local/lib -o a.out *.f90 /home/turekg/local/lib/libnetcdf.a > > works just fine A couple of notes here: - the '-l' syntax is designed to be used as a shorthand to reference libraries without having to specify the full name. Here is an example snippit: -L/home/turekg/local/lib -lnetcdf - second, the way you are using your '-L' specification presumes that you are in a particular directory. Even then it should be more explicit. - third, your ifort invocation is not doing any compiling, so you can leave out the directives to search include directories as these are only used during compiles For instance, I would rewrite your first ifort invocation line as: ifort -g -L/home/turekg/local/lib -lnetcdf -o a.out *.f90 > re:where did you get the binary netCDF distribution > > I got it from you. OK. I will let Ed know that the binary distribution of the library does not have needed Fortran entry points. Cheers, Tom **************************************************************************** Unidata User Support UCAR Unidata Program (303) 497-8642 P.O. Box 3000 address@hidden Boulder, CO 80307 ---------------------------------------------------------------------------- Unidata HomePage http://www.unidata.ucar.edu **************************************************************************** Ticket Details =================== Ticket ID: EZD-873215 Department: Support netCDF Priority: Normal Status: Closed