[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[netCDF #HFH-711245]: Linking from Windows Fortran to NetCDF 4.2 shared library
- Subject: [netCDF #HFH-711245]: Linking from Windows Fortran to NetCDF 4.2 shared library
- Date: Tue, 19 Feb 2013 17:01:49 -0700
Good afternoon Graham,
> I am trying to rebuild, in a 64-bit Windows 7 command-line environment using
> Intel Visual Fortran compiler XE 12.1, an executable that used to work fine
> with NetCDF 3.5 in a 32-bit Windows environment. I formerly used gcc to
> compile the C code and Intel Fortran for my own Fortran code. I have tried
> and failed to build the MinGW-64 C compiler, and it seems that I must invest
> in a commercial 64-bit C compiler. One way to avoid this, that ought to work
> but doesn't, is to rely on your shared library from
> NetCDF-4.2.dev-NC4-64-shared.exe.
>
I'll try my best to help you out. A couple of things to start; first,
beginning with
netCDF 4.2, the netCDF-C and netCDF-Fortran libraries have been separated
from each other. The netCDF-Fortran source code is available for download
from:
http://www.unidata.ucar.edu/downloads/netcdf/netcdf-fortran/index.jsp
The netCDF-Fortran libraries depend on the netCDF-C libraries, so those will
need to be installed first.
The pre-built libraries you reference, netCDF-4.2.dev-NC4-64-shared, built
using a developer snapshot; these are netCDF-C libraries. The are built
specifically for use with Visual Studio and/or in a development environment
using the Microsoft development libraries. Work to provide corresponding
netCDF-Fortran libraries is ongoing, but they are not yet available.
The netCDF-C and corresponding netCDF-Fortran libraries can be used on
Windows when using the MSYS/MinGW or Cygwin
development environments.
You mention the difficulties you've had building the 64-bit MinGW C compiler;
it is certainly true that it is not very intuitive. According to my notes, I
was able
to build MinGW-64 using the code available at:
http://sourceforge.net/projects/mingw-w64/.
Once downloaded, I have a note to follow the directions in 'mingw-w64-v2.0.7/
mingw-w64-doc/howto-build'. Note that I built MinGW-64 inside of the MSYS
environment, installed from here: http://www.mingw.org/wiki/MSYS
If you were to go this route, I can confirm that the netCDF-C and netCDF-Fortran
libraries appear to compile with MinGW. Likewise, if you were able to use
cygwin, the netCDF-C and netCDF-Fortran libraries are available as packages
which can be installed from the cygwin package manager.
I'm sorry I can't point you to an MFC/Windows-developer-library compatible
netCDF-fortran library, but hopefully this information will help.
Have a great evening,
-Ward
p.s., I notice that this support request is entered in our system twice; I will
close the earlier one, but leave this one open if there are any questions I
can help with.
>
> With thanks for your attention.
>
>
>
> Graham Cogley.
>
>
>
> J. Graham Cogley, Ph.D., Professor of Geography,
>
> Department of Geography, Trent University,
>
> Peterborough, Ontario, CANADA K9J 7B8.
>
>
>
> Tel +1 705-748-1011-x7686
>
> Email address@hidden
>
> Web http://www.trentu.ca/geography/glaciology
>
>
>
>
>
Ticket Details
===================
Ticket ID: HFH-711245
Department: Support netCDF
Priority: Normal
Status: Open