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

Re: 20020207: Installing netCDF on Windows Platform



>To: <address@hidden>
>From: "Guy Gersbach" <address@hidden>
>Subject: Installing netCDF on Windows Platform
>Organization: UCAR/Unidata
>Keywords: 200202070343.g173hvx14061

Hi Guy,

> I need to compile FORTRAN code that outputs data in NetCDF format.  I
> have an Absoft compiler and have downloaded the windows32 binaries and
> placed them in the appropriate directories.  My code compiles code
> containing netCDF routines, however I'm having problems linking the
> FORTRAN object files with the netCDF library.
>
> Is there a way to test if these libraries are compatible with the
> compiler?

The binaries we make available were compiled with the Microsoft
Digital C++ 6 compiler, and unfortunately are only compatible with the
Microsoft Digital Fortran 6 compiler.  This is because each compiler
uses different conventions for calling C functions from Fortran, and
the netCDF Fortran interface is implemented using a thin veneer of
Fortran routines that call the underlying C library.

However, you might be able to adapt the steps documented by Dirk
Slawinski for linking netCDF with Fortran programs compiled by the
Lahey Fortran compiler on Win32 systems:

  http://www.cwr.uwa.edu.au/%7eslawinski/work/netcdfinfo.html#WinNT

Also, I'm not sure if this is applicable, but Tom Grills has

  ... recently developed an ActiveX Library that allows manipulation
  of netCDF files in any win32 development environment which supports
  Active X, including Visual Basic.  I have a trial version available
  to anyone who is interested in trying it out.  It requires the win32
  build of the netCDF.dll but once registered, can easily be
  referenced from within VB, Excel, Access, Dephi, C++, etc....

  If you would like to try the trial version, contact me directly...
  address@hidden

> Will it be necessary to  re-build these libraries with the Absoft
> Fortran compiler and, if so, has anyone built them with an Absoft
> Fortran compiler version 7.0?

Several people have managed to build the netCDF library from source
with Absoft compilers on other platforms (Mac OS X, Linux):

  http://www.unidata.ucar.edu/packages/netcdf/other-builds.html#absoft-macosx

I'm not aware if anyone has succeeded in doing this on a Win32
platform.  There's a little more information in replies to support
questions about building the Fortran interface with Absoft compilers
you can get by entering "absoft" as the search keyword in a search of
the netCDF support email archive at the bottom of the netCDF home
page:

  http://www.unidata.ucar.edu/packages/netcdf/

If you find a way to make this work, please let us know and we'll
document it for others.

--Russ

_____________________________________________________________________

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