Adam, > Date: Wed, 28 Apr 2004 11:14:34 -0700 (12:14 MDT) > From: Adam Wilhite <address@hidden> > To: address@hidden > Subject: [Fwd: udunits/netcdf library problems] The above message contained the following: > Steve, > Can you help me with this. We are using absoft fortran version 7. > > thanks, > Adam Wilhite ... > Date: Wed, 27 Aug 2003 18:04:46 -0400 > From: "Sharon P. Burton" <address@hidden> > To: Adam Wilhite <address@hidden> > Subject: udunits/netcdf library problems > > Hi Adam, > I've been trying to compile my code on grimlock with the libraries you > installed for me and I'm getting "undefined references" like it can't > see things in the library that I know are there. It looks to me that > the compiler I'm using (/usr/absoft/bin/f90) disagrees on things like > underscores and upper case/lower case with what's in the library archive > files, libudunits.a and libnetcdf.a. It's almost like the compiler > doesn't match what was used to build the libraries. What compilers did > you use? Were there any options that controlled the naming? > > Thanks again for taking the time to help me with this.... > > Cheers, > Sharon Sharon's analysis is right on. When I previously told you to define the C macro "f2cFortran" when building the netCDF and UDUNITS packages, it was because you were on a Linux system and the default argument-passing and naming conventions for that system are enabled by that macro. I didn't know you were going to use Absoft's Fortran compiler (I should have asked). Because different Fortran compilers have different argument-passing and naming conventions, the C compiler needs to know which set of conventions to use. For Absoft's Fortran compiler, the C macro to be defined is either "AbsoftUNIXFortran" or "AbsoftProFortran". I'm afraid I don't know how to distinguish between these two (we don't have them here). Hopefully, you'll know which one is correct for Absoft Fortran version 7. You'll have to re-build and re-install the netCDF and UDUNITS packages. Ensure that the environment variable CPPFLAGS defines the appropriate C macro before executing the configure script, e.g., export CPPFLAGS=-DAbsoftProFortran # note "-D" prefix or setenv CPPFLAGS -DAbsoftUNIXFortran # note "-D" prefix depending on your user-shell. Do a "make distclean" first for each package, setup the environment variables, and then execute the configure script. Then a "make", "make test", and "make install" should do the trick. Please let me know if this helps. Regards, Steve Emmerson
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.