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

Re: 970418: trouble linking



>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