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.
> Full Name: Erik Abenius > Email Address: address@hidden > Organization: Efield AB > Package Version: 3.6.2 or later > Operating System: Windows 32-bit and x64 editions > Hardware: > Description of problem: Hello, > > We're using netcdf for our software which is available in 32- and 64-bit versions for both Linux and Windows. We build static netcdf libraries from source using Intel Fortran 9.1/gcc/gnu make under Linux and Intel Fortran 9.1/Intel C++/nmake under Windows. Our main code is fortran 90 and we use netcdf modules. > > Our Linux version currently use netcdf 3.6.2 and we will probably move to 4.0 soon. > > For our 32- and 64-bit Windows versions we use netcdf 3.5.1 since we have failed to build any later version. We have now come to a point where it is critical to move to a netcdf version supporting 64-bit offset in Windows. Preferrably we would like to use netcdf 3.6.2 or 4.0. However, so far I have had no luck in building these libraries. > > We have tried with cygwin but without luck, the configure script fails and I have not been able to get ifort to work correctly under windows. One of the problems seems to be that object files are named .obj instead of .o. > > What is the recommended way of building netcdf 3.6.2 or later for Windows 32- and 64-bit? I've made extensive searches on the web but the only success story I've found for Windows building is for netcdf 3.5.1. > > Can you give me any pointers? Have you yourself or anyone you know of built 64-bit windows libraries for a recent version of netcdf? In that case which compilers and build environment did they use? > > Greatful for any help. > > Best regards, > Erik. > > Howdy Erik! Get the snapshot distribution of netCDF and unpack it. Then go into the win32/NET directory of the distribution, and open the solution file netcdf.sln. This will allow you to build netCDF3.6.x with visual studio 2008. Simply modify the properties of the various projects in the solution file to get 64-bit. As for fortran, that is a bit harder. I also have never been able to get the ifort compiler to work from the command line in windows. NetCDF fortran does build with ifort (on linux), so it will work if you can find the right magic. Alternatively, you could add the fortran directory as a project to the solution file. Actually the fortran API is built with C, not fortran. So by setting the correct flag for ifort (which I think is pgiFortran), then you can build the C files in the fortran directory, and get the fortran API to work. I hope this helps. For more info see our FAQ: http://www.unidata.ucar.edu/software/netcdf/docs/faq.html#windows_netcdf4 Please let me know if you need more help. Thanks, Ed Ticket Details =================== Ticket ID: FRX-709060 Department: Support netCDF Priority: Normal Status: Closed