[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 970418: trouble linking

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.


  • Subject: Re: 970418: trouble linking
  • Date: Fri, 18 Apr 1997 13:38:44 -0600

>To: address@hidden
>From: Greg Asner <address@hidden>
>Subject: trouble linking
>Organization: CIRES/Center for the Study of Earth from Space
>Keywords: 199704181745.LAA15414

Hi Greg,

> We built NetCDF on a Sun with OS5.5, and the netcdf.h and libnetcdf.a 
> files are in the directory with the source code for our model.  
> Everything seems to be working fine until it tries to link, and then we 
> receive the error message below.  Can you tell me what I might be missing?
> 
> Thanks, Greg Asner
> 
> Undefined                       first referenced
>  symbol                             in file
> xdr_enum                            libnetcdf.a(var.o)
> xdr_float                           libnetcdf.a(cdf.o)
> xdr_int                             libnetcdf.a(cdf.o)
> xdr_vector                          libnetcdf.a(sharray.o)
> xdr_u_long                          libnetcdf.a(cdf.o)
> xdr_double                          libnetcdf.a(cdf.o)
> xdr_long                            libnetcdf.a(dim.o)
> xdr_opaque                          libnetcdf.a(cdf.o)

Yes, on SunOS 5 you need to add "-lnsl" to the end of the link
line, since that's where the Sun's XDR package resides.

With netcdf-3, to be announced soon, you won't need that because we no
longer use vendor-supplied XDR libraries.

--Russ

_____________________________________________________________________

Russ Rew                                         UCAR Unidata Program
address@hidden                     http://www.unidata.ucar.edu