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

Re: 970129: netcdf question, bad return address



>To: address@hidden
>From: davide@dedalus (David Edelman)
>Subject: Installation omission/BUG?
>Organization: .
>Keywords: 199701290536.WAA02662

Hi,

First, I hope you are the person for which this reply is intended.  We
just got a question about netCDF software from

  A/Prof. David Edelman, Univ. of Wollongong

but the return email address on the message, "davide@dedalus (David
Edelman)", was incomplete, so I came up with your email address after a
search.  If you are not the David Edelman to whom this should be
directed but know his email address, could you kindly forward this note
to him?  Thanks.

> We followed the instructions for installing the netcdf libraries
> for fortran linking, and when we link the libnetcdf.a (last compilation
> instruction on page 35 of the manual) it tells us it never heard of
> the xdr functions.  Were we meant to have installed an xdr library?  
> There is no mention of this that we can find anywhere in the documentation.
> 
> Any help you can give us would be appreciated.
> 
> 
> Cheers,
> 
> A/Prof. David Edelman, Univ. of Wollongong
> 
> P.S.  We are running on a SPARC 20, though this bug would not appear to

The XDR library on SPARC/Solaris systems is available in the
/usr/lib/libnsl library, so you need to add "-lnsl" to your link lines.
This is one of the systems referred to in the documentation on page 35
that says:

    On some systems, you must specify an additional library after the
    netCDF library where the system XDR libraries are found.

One way to find what flags are used in compiling and running netCDF
Fortran programs on your platform is to change to the netcdf
src/fortran/ directory, remove the test program "ftest", and remake it
by invoking "make test", which should result in something like:

    f77 -o ftest ftest.o -L../libsrc -lnetcdf -lnsl
    ...

but may differ, depending on what Fortran compiler you are using.  The
"-L../libsrc" should be replaced by something that indicates where your
netCDF library is actually installed, and you should include whatever
flags follow "-lnetcdf".  The User's Guide does not include this hint,
because the netcdf src/ directories are not always available to users.

I hope this helps.

--Russ

_____________________________________________________________________

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