[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
961009: install questions
- Subject: 961009: install questions
- Date: Wed, 09 Oct 96 15:03:15 -0600
Yun He,
>Date: Wed, 9 Oct 1996 16:54:45 -0400
>From: address@hidden (Yun He)
>Organization: University of Delaware
>To: address@hidden
>Subject: Re: : 961009: install questions
>Keywords: 199610091657.AA29515
In the above message you wrote:
> Yes, now I find out the /man /lib /include and /bin directories generated
> by installing. I do find a library netcdf file there.
> And I have put the path in my .cshrc file again.
>
> but just compile a simplest code has problem:
> integer NCID
> ncid=NCOPN('9211.01-15surf_kav.cdf', NCNOWRIT, RCODE)
> stop
> end
>
> {argo:141}f77 -I/home1/yunhe/netcdf-2.4.3/include readcdf.f
> readcdf.f:
> MAIN:
> Undefined first referenced
> symbol in file
> ncopn_ readcdf.o
> ld: fatal: Symbol referencing errors. No output written to a.out
You need to reference the netCDF library on your link-line, e.g.
f77 -I/home1/yunhe/netcdf-2.4.3/include readcdf.f
-L/home1/yunhe/netcdf-2.4.3/lib -lnetcdf
See the manual pages for your f77(1) and ld(1) utilities for more
information.
>
> and if I add a first line: include 'nercdf.inc', still says:
> "readcdf.f", line 1: Cannot open file netcdf.inc
I don't understand this error. If you give the f77(1) utility the
option that references the netCDF include directory, and if the file
`netcdf.inc' is in that directory, they the compiler should find it.
--------
Steve Emmerson <address@hidden>