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.
Tao, >Date: Fri, 24 May 2002 18:42:30 -0400 >From: "Tao" <address@hidden> >Organization: ? >To: "Steve Emmerson" <address@hidden> >Subject: Re: 20020520: netCDF g77 compilation and "-fno-second-underscore" >Keywords: 200205172158.g4HLwZa14895 The above message contained the following: > Hi, Steve: > > THANK YOU VERY MUCH FOR YOUR HELP! You're most welcome. > We successfuly compiled the netcdf using g77 by setting the > CPPFLAGS=-DpgiFortran and FFLAGS = -fno-second-underscore. Make test works > and it also fits with the -fno-second-underscore we have to use for another > third part library we need. The compiled netcdf library functions have only > one underscore append which is what we need. Excellent! > as follwing is several failed compiling options we tried. Again, we don't > have Fortran 90 available. So we use g77 to compile the netcdf. > > 1. CPPFLAGS= > FFLAGS = > > compile error in cfortran.h > > > 2. CPPFLAGS = -DpgiFortran > FFLAGS= > > g77 compile all codes but make test fails. because the compiled library > function only has one underscore while test programs look for two > underscore. > > 3. CPPFLAGS= -Df2cFortran > FFLAGS = > > g77 compiles all code and make test work also. Library functions have > two underscores which don't fit with another third party library we are > using. > > 4. CPPFLAGS= -Df2cFortran > FFLAGS = -fno-second-underscore > > g77 compile all codes but make test fails. because the compiled library > function have two underscores while test programs look for one underscore. > > 5. CPPFLAGS= -DpgiFortran > FFLAGS = -fno-second-underscore > > g77 compiles all code and make test work. library function has only one > underscore append which is what we want. > > Basically, our problem is resolved using option 5. It seems to me the > CPPFLAGS option is used when we compiled netcdf library and FFLAGS is used > only for netcdf test programs. Is my understanding right? That is correct. > Again, many thanks to your kind help and have a great holiday weekend! Thank you. Good luck to you. Regards, Steve Emmerson <http://www.unidata.ucar.edu>