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.
Eirh-Yu Hsie, >Date: Thu, 7 Dec 1995 13:59:06 -0700 >From: address@hidden (Eirh-Yu Hsie) >Organization: NOAA >Subject: Re: 951206: netCDF 2.4 >Keywords: 199512061703.AA12237 In the above message you wrote: > > I notice that your build-line was > > > > f77 -L/wrk/d0/newsoft/netcdf/netcdf-2.4-beta5/lib -lnetcdf -o rdtest.ex > > rdtest.F > > > > I believe the problem is caused referencing the netCDF library > > (-lnetcdf) before referencing the main routine (rdtest.F). Try the > > following build command > > > > f77 -o rdtest.ex rdtest.F -L/wrk/d0/newsoft/netcdf/netcdf-2.4-beta5/lib > > -lnetcdf > > > > Please let me know if this works. > > -------- > > Steve Emmerson <address@hidden> > > > > It solves one, but generates a new one: > > f77 -o rdtest.ex rdtest.F -L/wrk/d0/newsoft/netcdf/netcdf-2.4-beta5/lib > -lnetcdf > /tmp/cpp.22897.0.f: > MAIN rdinit: > Undefined first referenced > symbol in file > xdr_enum > /wrk/d0/newsoft/netcdf/netcdf-2.4-beta5/lib/libnetcdf.a(array.o) > xdr_float > /wrk/d0/newsoft/netcdf/netcdf-2.4-beta5/lib/libnetcdf.a(array.o) > xdr_int > /wrk/d0/newsoft/netcdf/netcdf-2.4-beta5/lib/libnetcdf.a(iarray.o) > xdr_u_long > /wrk/d0/newsoft/netcdf/netcdf-2.4-beta5/lib/libnetcdf.a(array.o) > xdr_double > /wrk/d0/newsoft/netcdf/netcdf-2.4-beta5/lib/libnetcdf.a(array.o) > xdr_long > /wrk/d0/newsoft/netcdf/netcdf-2.4-beta5/lib/libnetcdf.a(array.o) > xdr_opaque > /wrk/d0/newsoft/netcdf/netcdf-2.4-beta5/lib/libnetcdf.a(array.o) > ld: fatal: Symbol referencing errors. No output written to rdtest.ex You'll need to reference the network support library for the XDR routines. Add `-lnsl' to the above build-line, e.g. f77 -o rdtest.ex rdtest.F \ -L/wrk/d0/newsoft/netcdf/netcdf-2.4-beta5/lib -lnetcdf \ -lnsl Please let me know if this works. > I think I have a configuration error in a file: config.log: > > mustang:[215]% cat config.log > This file contains any messages produced by compilers while > running configure, to aid debugging if configure makes a mistake. > > Undefined first referenced > symbol in file > xdr_long conftest.o > ld: fatal: Symbol referencing errors. No output written to conftest > ld: fatal: library -lrpc: not found > ld: fatal: File processing errors. No output written to conftest The above are just error messages from the configure script as it tries to figure out your system. They may safely be ingored. -------- Steve Emmerson <address@hidden>