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

[netCDF #EDQ-194344]: Use NetCDF Problems



Florian,

> First of all I don't understand what "-I or -M flag" means.

I was referring to a compiler option used to specify where the
Fortran compiler should find include files of .mod files.  This was
just to answer your question about the "netcdf.inc" file and why it
wasn't included in the Fortran-90 example you are trying to compile.

Perhaps I didn't make it clear, but we have not ported the Fortran-90
programming interface to Windows, so if you want to use the DLLs we
provide, you will have to use the Fortran-77 interface.  That means
you cannot compile simple_xy_wr.f90, but should try simple_xy_wr.f
instead.

I also gave you a reference to someone else who has ported Fortran-90
netCDF interfaces to Windows, in case you wanted to try using that.

> Then, using the file from the win32_vs_PGI_dll_4.0.1 directory I don't
> have all I need as I don't have any netcdf.mod, isn't it? (there is an
> error with the use netcdf which mean that something is missing) Then I
> tried to link a file netcdf.mod I had from someone else, to my
> project. It now make the link for the "use netcdf" but there are
> errors for each netcdf functions as below :
> 
> Erreur 1 error LNK2019: symbole externe non rsolu
> _NETCDF_mp_NF90_CREATE rfrenc dans la fonction _MAIN__ test.obj
> 
> What can it be?

The file netcdf.mod you got from someone else will not work unless it
was built by the same Windows compiler you are using.  Also you need
more than the netcdf.mod file to use the Fortran-90 netCDF interface,
you also need to have compiled the Fortran-90 source code and added it
to the netCDF library.  The DLLs we provide don't have the Fortran-90
functions compiled in them.

> Another thing concerning the ncdump.exe and ncgen.exe, trying to run
> it, double-clicking on it, an error appears telling that the
> hdf5_dldll.dll is missing. So do you I need this library and where can
> I find it?

Yes, please follow the instructions here for what you need and where
to get it:

  http://www.unidata.ucar.edu/netcdf/docs/faq.html#windows_netcdf4

In particular, note that it says:

  Unlike Unix builds, the Visual Studio build *always* requires HDF5,
  zlib, and szlib in all cases. All Windows DLL users must also have
  the HDF5, zlib, and szlib DLLs. These are now available from the
  Unidata FTP site:

and it gives links to those DLLs.

--Russ

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



Ticket Details
===================
Ticket ID: EDQ-194344
Department: Support netCDF
Priority: Normal
Status: Closed