Due to the current gap in continued funding from the U.S. National Science Foundation (NSF), the NSF Unidata Program Center has temporarily paused most operations. See NSF Unidata Pause in Most Operations for details.
Il 6/25/2013 6:12 AM, Derek Goring ha scritto:
OK, so I've downloaded the Fortran netCDF routines from cygwin using setup.exe. Now, I seem to have what I need, but I cannot put it together.
Hi Derek, cygwin is a unix emulation layer, so go on unix way
Here's a little test program: Program TestnetCDF implicit none include 'c:/cygwin/usr/include/netcdf.inc'
include '/usr/include/netcdf.inc'
integer :: ncid,status status=nf_open("Kapiti.nc",nf_nowrite,ncid) end Program which compiles OK. But when I try to link: $ gfortran TestnetCDF.o c:/cygwin/lib/libnetcdff.dll.a TestnetCDF.o:TestnetCDF.f90:(.text+0x24): undefined reference to `nf_open_' collect2: ld returned 1 exit status
gfortran TestnetCDF.f -lnetcdff -o TestnetCDF
What am I doing wrong?
-lnetcdff means link with "netcdff library in the default search path" Regards Marco
netcdfgroup
archives: