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

[netCDF #OYF-247664]: Linking failed when building netcdf4.1.1 in cygwin



> Hello I have built netcdf4.1.1 in cygwin  and it all looks ok when I run the 
> checks and tests but when I try to compile fortran code against it I get a 
> whole list of undefined reference errors, such as:
> 
> 
> > gfortran -o a.out -L/lib -L/lib -lnetcdff -lhdf5_hl -lhdf5 *.o
> 
> handle_err.o:handle_err.f90:(.text+0x25): undefined reference to 
> `___netcdf_MOD_nf90_strerror'
> read_input.o:read_input.f90:(.text+0xaa4): undefined reference to 
> `___netcdf_MOD_nf90_open'
> read_input.o:read_input.f90:(.text+0x1070): undefined reference to 
> `___netcdf_MOD_nf90_inq_varid'
> read_input.o:read_input.f90:(.text+0x10d0): undefined reference to 
> `___netcdf_MOD_nf90_get_var_1d_eightbytereal'
> 
> I have verified that the libraries exist in /cygdrive/c/cygwin/lib. I am 
> using gfortran 4.3.4.
> Thanx
> gaby
> 
> 
> Please consider the environment before printing this email.
> 
> NIWA is the trading name of the National Institute of Water & Atmospheric 
> Research Ltd.
> 
> 

Howdy again Gaby!

I don't know what is causing this problem. (But make sure that your gfortran is 
updated, if it's 4.0 or 4.1 that could be your problem.)

I do know that the netCDF daily snapshot is building cleanly in cygwin.
ftp:://ftp.unidata.ucar.edu/pub/netcdf/snapshot/netcdf-4-daily.tar.gz

Thanks,

Ed

Ticket Details
===================
Ticket ID: OYF-247664
Department: Support netCDF
Priority: Critical
Status: Closed