This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
> Dear colleagues, > > For quite some time now I try to compile the source netCDF for Windows > ( 32 and 64 bit) to make a netcdf.dll to be called by a FORTRAN-90 code > ( NEMO ocean model) which calls functions with names starting with NF90. > I can use INTEL FORTRAN compiler v.9, 10, and 11 for Windows for my > FORTRAN code. > > 1) I tried your netcdf.sln solution which comes with > netcdf-3.6.3\win32\NET, using MS Visual studio 2003 and MS Visual Studio > 2008. It does NOT compile , producing the multiples errors of the > following description : > > c:\Program Files\Microsoft Visual Studio .NET > 2003\Vc7\include\wchar.h(468): error C2011: '__stat64' : 'struct' type > redefinition > > c:\Program Files\Microsoft Visual Studio .NET > 2003\Vc7\include\wchar.h(437) : see declaration of '__stat64' > > c:\Program Files\Microsoft Visual Studio .NET > 2003\Vc7\include\sys\types.h(72): error C2632: 'long' followed by > '__int64' is illegal > > c:\netcdf-3.6.3\fortran\fort-control.c(98): warning C4141: 'dllexport' : > used more than once > > 2) The previous version netcdf-5.5.0 DOES compile by VC7 which comes > with Visual Studio 2003 using your msoft.mak file from the command line > ( i.e outside the IDE). However the generated library only contains > functions with names starting with 'nc', not 'NF90', and hence is not > compatible with my FORTRAN-90 code. > > The version of netcdf which is known to work with the the same FORTRAN > code on LINUX is 3.6.1. I would be grateful if you could provide > suitable binaries or makefiles or other solutions or any other help for > me to be able to use netcdf-3.6.1 or 3.6.3 with FORTRAN-90 program on > WINDOWS 32/64. > > I am really stuck at the moment. > > Regards Georgy Shapiro > > tel +44-(0)1752-584721; fax +44-(0)1752-584710 > http://www.coastalprocesses.org/ > http://www.research.plymouth.ac.uk/shelf/research.html > > > Howdy Georgy! Sorry, but we have never provided a port of the F90 API to windows. The problem is that, unlike Unix based systems, there is no standard way to build for different compilers. To support F90 on windows we would have to do so one compiler at a time, and keep a different build system, all up-to-date. (And this is what I tried to do with Visual Studio, on a smaller scale, for the C library. Even that does not work because of variations in Visual Studio and VC++ between versions.) If the code you are trying to run was originally written for Linux, yet you must run on a windows platform, why not use Cygwin? The netCDF F90 API (and all other APIs) build well under Cygwin. I am working to produce a new netCDF DLL right now, but it will not include the F90 API. Thanks, Ed Ticket Details =================== Ticket ID: LIC-627461 Department: Support netCDF Priority: Urgent Status: Closed