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.
Kate, > To: address@hidden > From: Kate Hedstrom <address@hidden> > Subject: netcdf vs. egcs > Organization: Rutgers University > Keywords: 199803101832.LAA14303 In the above message, you wrote: > I just tried to compile netCDF version 3.4 with the new version of > the egcs compiler, consisting of gcc, g++, and g77. It was doing > fine through the C and C++ part, but nf_test failed to link. It > seems that g77 has a different convention on underscores than Sun > f77: > > ahab% more noot.f > subroutine nf_nothing > end > > subroutine nfnothing > end > ahab% g77 -c noot.f > ahab% nm noot.o > > > noot.o: > > [Index] Value Size Type Bind Other Shndx Name > > [3] | 0| 0|SECT |LOCL |0 |2 | > [2] | 0| 0|NOTY |LOCL |0 |2 |gcc2_compiled. > [5] | 0| 20|FUNC |GLOB |0 |2 |nf_nothing__ > [4] | 20| 20|FUNC |GLOB |0 |2 |nfnothing_ > [1] | 0| 0|FILE |LOCL |0 |ABS |noot.f > ahab% f77 -c noot.f > noot.f: > nf_nothing: > nfnothing: > ahab% nm noot.o > > > noot.o: > > [Index] Value Size Type Bind Other Shndx Name > > [3] | 16| 12|FUNC |GLOB |0 |2 |nf_nothing_ > [2] | 48| 12|FUNC |GLOB |0 |2 |nfnothing_ > [1] | 0| 0|FILE |LOCL |0 |ABS |noot.f > > > Anyway, the link fails because the fortran side is looking for > things like nf_open__ while the C side is providing nf_open_. > THis is not critical for me because I use the egcs netcdf libraries > for C++, not Fortran, but thought you might be interested in knowing > about this problem. > > Kate > - -- > Kate Hedstrom Institute of Marine and Coastal Sciences > address@hidden Rutgers University Thanks for the report. Unfortunately, we don't have a working g77 here so I can't duplicate the problem. This is why we recommend using fort77(1) in the INSTALL file instead of g77. We're working on getting g77(1) to work, however, so that compiler should be supported soon. -------- Steve Emmerson <http://www.unidata.ucar.edu>