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.
Pascale, >Date: Fri, 07 Jul 2000 14:33:10 -0700 >From: Pascale Lherminier <address@hidden> >Organization: Naval Postgraduate School >To: Steve Emmerson <address@hidden> >Subject: Re: 20000707: can't link with the library on a SGI 6.3 (or 6.5) >Keywords: 200007072044.e67KigT10888 In the above message, you wrote: > /usr/bin/nm -rg /d/span9/pascale/NETCDF/netcdf-3.4/lib/libnetcdf.a | grep > nf_create > > produces > > [244] | 1532| |Proc |ref=1 |Text | > fort-control.o:nf_create_ > > It seems correct ... The above is correct. It seems, however, to be inconsistent with the linker messages in your previous email: > f77 -I/d/span9/pascale/NETCDF/netcdf-3.4/include > -L/d/span9/pascale/NETCDF/netcdf-3.4/lib -lnetcdf ncexample2.f ... > ld32: WARNING 84 : /d/span9/pascale/NETCDF/netcdf-3.4/lib/libnetcdf.a is not > used for resolving any symbol. > ld32: ERROR 33 : Unresolved text symbol "nf_create_" -- 1st referenced by > ncexample2.o. Try manually linking your program together. Use different linker options. See if you can find a set of options that work. Shoot! I just realized that you have the library specification BEFORE the Fortran source-file. Switch them: f77 -I/d/span9/pascale/NETCDF/netcdf-3.4/include ncexample2.f -L/d/span9/pascale/NETCDF/netcdf-3.4/lib -lnetcdf This should do the trick. Regards, Steve Emmerson <http://www.unidata.ucar.edu>