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.
Nguyen Dang Quang, >Date: Fri, 11 Oct 2002 21:15:49 +0200 (MET DST) >From: "Nguyen Dang Quang" <address@hidden> >Organization: ICTP, Italy >To: address@hidden >Subject: Re: 20021011: building netCDF with pgf90: undefined references The above message contained the following: > The attached file are: > 01. xix file { contains the ouput mess. from command: > nm -g libnetcdf.a | grep nf_open } > 02. libnetcdf.a file > > Mr. Steve Emmerson, I really dont understand exactly what You said: > " ...this can be done with the following command: > > $ nm -g libnetcdf.a | grep nf_open > [21] | 1376| 236|FUNC |GLOB |0 |2 |nf_open_ > [898] | 0| 0|FUNC |GLOB |0 |UNDEF |nf_open_ > " > > I didnt see two last line alike above when I put the command ( nm ...) in > the terminal. The nm(1) utility prints differently on different operating systems. Because your system differs from mine, the output is not the same. > How to continue ? or maybe if You can send me Your libnetcdf.a file ? > I need to use the netCDF package from a Fortran-90 program. The output from your "nm" command 00000398 T nf_open__ U nf_open_ shows that the routine that a Fortran-77 program must use to close a netCDF file is "nf_open__". This is the wrong name for that routine: it should be named "nf_open_" rather than "nf_open__". This could be because the object files in the "fortran/" subdirectory were originally compiled with the "f2cFortran" macro defined and then they were not removed before the package was rebuilt. The files would have been removed by step 3 (make distclean) described near the end of the file INSTALL.html. Did you execute the command "make distclean" before executing the configure script? If you didn't, then please try the following: 1. Go to the top-level source directory. 2. Perform steps 3 through 5 described near the end of the file INSTALL.html. Make sure that you execute the command "make distclean". 3. Execute the following command: setenv CPPFLAGS '-DNDEBUG -DpgiFortran' 4. Perform steps 6 through 9 described near the end of the file INSTALL.html. If you did execute the command "make distclean" before executing the configure script and the command "make", then something is very wrong and we'll have to investigate further. I suggest trying the above steps first. One question: what is your operating system? Regards, Steve Emmerson <http://www.unidata.ucar.edu>