Re: undefined reference with include 'netcdf.inc'
- From: robert.corbett@xxxxxxx
- Date: Fri, 27 Jun 2008 17:26:31 -0700 (PDT)
On Jun 27, 1:16 pm, deadpickle <deadpic...@xxxxxxxxx> wrote:
I am trying to compile a fortran 90 code (snippet):
include 'netcdf.inc'
!Open file and check for error
print *, "Open ", filename, "for NetCDF reading"
status = NF_OPEN(filename,0,ncid)
if (status /= NF_NOERR) then
print *, ' --! ERROR: Problem opening ', ADJUSTR(filename)
stop
endif
print *,"---Done"
with netcdf.inc containing:
integer nf_open
! (character*(*) path,
! integer mode,
! integer ncid)
external nf_open
On compiling I get the error:
In function `crefcell_mp_crefextract_.':
test1.f90: undefined reference to `nf_open_'
Any ideas on what this error means and how to resolve it?
Richard mentioned one possibility, which is that the
command line for the linker does not include the netcdf
library. Another possibility is that you are using a
version of the library that uses the f2c underscore
conventions. If you do nm on the library and see the
symbol nf_open__ is defined, that is the problem. If
that is the problem, a variety of fixes are possible.
Too many, unfortunately, to start making blind suggestions.
Bob Corbett
.
- References:
- undefined reference with include 'netcdf.inc'
- From: deadpickle
- undefined reference with include 'netcdf.inc'
- Prev by Date: Re: Is it time to legitimise REAL*8 etc?
- Next by Date: Re: Is it time to legitimise REAL*8 etc?
- Previous by thread: Re: undefined reference with include 'netcdf.inc'
- Next by thread: Overflow errror--what could cause this?
- Index(es):
Relevant Pages
|