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.
Doug, I suggest writing an executable shell-script that 1) understands the standard UNIX syntax used in the makefile for compiling and linking Fortran-90 code; and 2) executes the ftn95(1) utility in the appropriate manner. Then, configure the build procedure to use that script by 1. Going to the top-level source-directory. 2. Removing the file "config.cache" if it exists. 3. Setting the relevant environment variables as before. 4. Setting the environment variable F90 to the pathname of the script. 5. Re-executing the "configure" script. 6. Executing the command "make". Regards, Steve Emmerson ------- Original Message Date: Fri, 26 Nov 2004 17:01:29 +0100 From: <address@hidden>To: Steve Emmerson <address@hidden> Subject: Re: netcdf-3_6_0-beta6 question Hello Steve, Hope you had a good Thanksgiving... Just a quick update: I found one major problem, and that is I had *2* versions of the gnu fortran (g77) compiler floating around, one that I had downloaded explicitly for use with Windows from an individual's website, and another that subsequently came implicitly bundled with cygwin. Since both executables were accessible due to the path settings, I think my netcdf-3_6_0-beta6 build was getting confused. Anyway, long story short, I got rid of the first version I downloaded, redid the build with the cygwin version..and am happy to report that everything appears to work just fine. However...I would still like to try to make the fortran 90 build with the Salford compiler I have. The test part of the make chokes, as per this excerpt from the test log: --- Making `test' in directory /cygdrive/c/netcdf/netcdf-3_6_0- beta6/src/f90 make[2]: Entering directory `/cygdrive/c/netcdf/netcdf-3_6_0- beta6/src/f90' ftn95 -o netcdf_test netcdf_test.f90 netcdf.o typeSizes.o ../libsrc/libnetcdf.a [FTN95/Win32 Ver. 4.6.0 Copyright (C) Salford Software Ltd 1993-2004] Licensed to: Personal Edition User Organisation: www.silverfrost.com *** More than one source file specified 1 ERROR [netcdf_test] - Compilation failed. make[2]: *** [netcdf_test] Error 1 make[2]: Leaving directory `/cygdrive/c/netcdf/netcdf-3_6_0- beta6/src/f90' make[1]: *** [subdir_target] Error 1 make[1]: Leaving directory `/cygdrive/c/netcdf/netcdf-3_6_0-beta6/src' make: *** [f90/test] Error 2 --- This compiler does not use conventional switches, and in particular does not recognize the '-o' flag. It thus thinks two source files are being named ('netcdf_test' and 'netcdf_test.f90'), and stops dead. Plus, the linking is handled differently. As best I can tell based on the help materials supplied with the compiler, the compile line should look like this: ftn95 netcdf_test.f90 /link netcdf_test /library netcdf.obj typeSizes.obj ../libsrc/libnetcdf.a Note the insistance on '.obj' extensions. So, can you tell me where and how I can modify the make files to execute the compile with this syntax? Thanks and best regards, Doug ----- Original Message ----- From: Steve Emmerson <address@hidden> Date: Thursday, November 18, 2004 4:39 pm Subject: Re: netcdf-3_6_0-beta6 question > Doug, > > >Date: Thu, 18 Nov 2004 08:39:18 +0100 > >From: <address@hidden> > >Organization: Kent State University > >To: address@hidden > >Subject: netcdf-3_6_0-beta6 question > > The above message contained the following: > > > Sorry to bother you but I have a quick question. I'm having > problems > > building netcdf-3_6_0-beta6 under Windows XP. I sent a detailed > email > > about a week ago to address@hidden, with all the > configure, > > make logs, etc. However, I've not had a response yet. Is the > netcdf > > mailing list a better venue to send my questions? > > It looks like your inquiry might have fallen into a crack beteen Ed > Hartnett (who develops the netCDF package) and myself (who answers > someinstallation questions). > > As I recall, your question was about being able to use the > "netcdf.mod"file in other code. Unfortunately, there is no > standard regarding this > file, so the netCDF installation procedure doesn't do much with it. > > You should copy the file to a well-known directory which you must then > reference (via some option similar to "-I") on the compilation- > line for > the Fortran-90 software that uses the netCDF module. Consult the > documentation on your Fortran-90 compiler for details. > > Contact me if you have further questions. > > > Thanks, > > Doug Cripe > > Regards, > Steve Emmerson > ------- End of Original Message