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.
>To: <address@hidden> >From: "Daniela Meloni" <address@hidden> >Subject: problems >Organization: UCAR/Unidata >Keywords: 200108301431.f7UEV8129876 cygwin maks.zip visual c++ Hi Daniela, > as I can see, probably the original problem must be found in the > directories tree. I would like to describe my steps in the > installation of the netCDF package. > > I decompress the netcdf.tar.Z in /cygnus/cygwin-b20 and what I have > is: > > cygnus > cygwin-b20 > netcdf-3.5.0 > src > cxx > f90 > fortran > libsrc > man > nc_test > ncdump > ncgen > nctest > nf_test. > > As I decompress the file maks.zip in the netcdf-3.5.0/src (as > suggested in install.html), I obtain the following tree: Oops, the "maks.zip" file is intended only to build netcdf-3.5 using the using Microsoft Visual C++ 6.x and (optionally) Digital Visual Fortran 6.x compilers. But you had installed the Cygnus Development Suite (cygwin version 20) and the egcs compiler, so if you must build from source, you should just follow the instructions in the INSTALL.html file, which will use the egcs compiler. And it looks like you did that successfully, except that the "make install" failed. The "make install" doesn't work on cygwin installations yet, but that is our problem to find and fix. Sorry if this is not clearer from the documentation. > cygnus > cygwin-b20 > netcdf-3.5.0 > src > bin > cxx > f90 > fortran > include > lib > netcdf > msmake > bin > include > lib > src > cxx > fortran > libsrc > nc_test > ncdump > ncgen > nctest > nf_test > libsrc > man > nc_test > ncdump > ncgen > nctest > nf_test > src > cxx > fortran > libsrc > nc_test > ncdump > ncgen > nctest > nf_test. > It seems a little bit strange to me. Is it possible that I have to > decompress maks.zip in /netcdf-3.5.0 instead that in /netcdf-3.5.0/src ? With the cygwin environment, you should ignore win32_readme.txt completely, it is only for use with Microsoft compilers. > After this, I disregard what is written in the file win32_readme.txt, but > continue reading the install.html page. So, in the directory > /netcdf-3.5.0/src I run > ./configure > make > make test > make install > At this point the 'make install' fails. It is worth nothing that my > /netcdf-3.5.0 containes only the /src directory. > So I do what you wrote me to do: > > I don't know exactly why this "make install" step fails on cygwin, but > > it may have something to do with a missing "src/" directory in your > > source hierarchy, because from the above, I would have thought that > > libnetcdf.a was built in '/cygnus/cygwin-b20/netcdf-3.5.0/src/libsrc/' > > rather than in '/cygnus/cygwin-b20/netcdf-3.5.0/libsrc/'. > > > > But it doesn't matter, you can just copy the library, libnetcdf.a, to > > the destination directory where you want it installed, presumably > > /cygnus/cygwin-b20/netcdf-3.5.0/lib/. There are no subdirectories in > > that directory. For the C++ library, you may have to do the same > > thing, just copying cxx/libnetcdf_c++.a to the same destination > > directory where libnetcdf.a is installed. You'll also need to copy > > the include files > > > > /cygnus/cygwin-b20/netcdf-3.5.0/libsrc/netcdf.h > > /cygnus/cygwin-b20/netcdf-3.5.0/fortran/netcdf.inc > > /cygnus/cygwin-b20/netcdf-3.5.0/cxx/ncvalues.h > > /cygnus/cygwin-b20/netcdf-3.5.0/cxx/netcdfcpp.h > > /cygnus/cygwin-b20/netcdf-3.5.0/f90/netcdf.mod > > I don't have any netcdf.mod file! The netcdf.mod file would have been generated in compiling the Fortran90 interface, but if you didn't have a Fortran90 compiler, that interface would have been skipped. So it's OK not to have a netcdf.mod file. For Fortran programs, you will use the Fortran77 interface instead of the Fortran90 interface. > > to a destination include/ directory, presumably > > > > /cygnus/cygwin-b20/netcdf-3.5.0/include/ > > > > Finally, if you will use the utility programs "ncdump.exe" and > > "ncgen.exe", you'll need to copy those from their ncdump/ and ncgen/ > > directories to wherever its convenient to have these programs. One > > possibility is /cygnus/cygwin-b20/netcdf-3.5.0/bin/, but there may be > > a more convenient place that is already on your execution path. > > What do you think, is ti possible that I have to create > /netcdf-3.5.0/bin, /netcdf-3.5.0/include, /netcdf-3.5.0/lib, > /netcdf-3.5.0/man to complete the installation? No, it's not necessary on a single-user PC to create these directories and install copies of the generated files in them. But if you will be writing programs that use the netCDF library or referring often to the documentation, you might want to put the files you will use in such directories and then just delete all the netCDF src/ directories, since they would not be needed after the libraries and executables are built. If you don't install the library and include file in separate directories, you will have to remember to specify the correct source directories for compiling and linking other programs that use the netCDF library. It's possible to just do a binary installation instead of a source installation on a PC, and if you do that, you get just the directories and files needed to use the netCDF library in building other programs, but none of the source files. --Russ