------- Forwarded Message
Organization: UCAR/Unidata
Keywords: 200305121748.h4CHmo7U008863
X-Sender: magi@xxxxxxxxxxxxxxxxxxx
cc: netcdfgroup@xxxxxxxxxxxxxxxx, tisone@xxxxxxxxxxxxxxxxxx
>
> Hi netcdf group:
>
> We have installed netcdf 3.5 on a Linux system running RedHat 7.3.
> I am using pgf90 4.0-2 to compile a small f90 code, and am getting
> "undefined reference" errors:
>
> (sundog) foster : gmake
> pgf90 -c -I/opt/local/include rdmgcm.F
> pgf90 -c -I/opt/local/include mkcdf.F
> pgf90 -c -I/opt/local/include mkncfile.F
> pgf90 -o mkcdf mkcdf.o mkncfile.o rdmgcm.o
> -L/opt/local/lib
> -lnetcdf
> mkncfile.o: In function `mkncfile_':
> mkncfile.o(.text+0x110): undefined reference to `nf_create_'
> mkncfile.o: In function `handle_ncerr_':
> mkncfile.o(.text+0x77a): undefined reference to `nf_strerror_'
> gmake: *** [mkcdf] Error 2
> (sundog) foster :
>
hm, that sounds like a linker/f90 error. there should be a compiler switch
controlling name mangling: some fortran compilers add (or don't) an
underscore to function names.
hope this vague reply points you in the right direction.
cheers
magi
-------------
Magnus Hagdorn
Department of Geology and Geophysics
The University of Edinburgh
Grant Institute
West Mains Road
Edinburgh EH9 3JW
Scotland
PHONE: (+44) 131 650 5917
FAX: (+44) 131 668 3184
email: Magnus.Hagdorn@xxxxxxxxxxxx
------- End of Forwarded Message