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

[netCDF #OYI-144949]: Problem when use netcdf

Hi Yue,

> I have installed the NETCDF,
> This netCDF 4.1.1 has been built with the following features:
> --cc -> cc
> --cflags -> -I/usr/local/include
> --libs -> -L/usr/local/lib -lnetcdf -lhdf5_hl -lhdf5 -lz -lm
> --cxx -> c++
> --has-c++ -> yes
> --fc -> ifort
> --fflags -> -g -I/usr/local/include
> --flibs -> -L/usr/local/lib -lnetcdf -lhdf5_hl -lhdf5 -lz -lm
> --has-f77 -> yes
> --has-f90 -> yes
> --has-dap -> no
> --has-nc2 -> yes
> --has-nc4 -> yes
> --has-hdf5 -> yes
> --has-hdf4 -> no
> --has-szlib -> no
> --prefix -> /usr/local
> --includedir-> /usr/local/include
> --version -> netCDF 4.1.1
> the thing is when I need to output nc data ,using the FVCOM ocean model
> there is a mistake like this
> undefined reference to `netcdf_mp_nf90_enddef_'
> /home/yue/FVCOM2.6.1/run/mod_lag.f90:1821: undefined reference to
> `netcdf_mp_nf90_close_'
> /home/yue/FVCOM2.6.1/run/mod_lag.f90:1824: undefined reference to
> `netcdf_mp_nf90_open_'
> /home/yue/FVCOM2.6.1/run/mod_lag.f90:1827: undefined reference to
> `netcdf_mp_nf90_strerror_'
> /home/yue/FVCOM2.6.1/run/mod_lag.f90:1831: undefined reference to
> `netcdf_mp_nf90_put_var_1d_fourbytereal_'
> /home/yue/FVCOM2.6.1/run/mod_lag.f90:1832: undefined reference to
> `netcdf_mp_nf90_put_var_1d_fourbytereal_'
> So I write a f90 program like this
> program netcdf_version
> use netcdf
> print *, trim(nf90_inq_libvers())
> end
> Then is goes like this ,a mistake
> undefined reference to `netcdf_mp_nf90_inq_libvers_'
> Now I do not know what to do ,how to resolve this problem.

There are several possible causes for such a problem, depending on whether
your netCDF library was built and installed as a shared library or a static 
whether you're using the same Fortran compiler as was used when the library was
built, whether an older version of the library is installed on your library 
path, what
options you used for the configure script when the netCDF library was compiled, 
whether you have set the LD_LIBRARY_PATH environment variable to include the
library installation directory, etc.

We might be able to diagnose the problem if you would send the information 
listed here:




Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu

Ticket Details
Ticket ID: OYI-144949
Department: Support netCDF
Priority: Normal
Status: Closed

NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.