NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
Sounds like your libnetcdf.a was compiled on an older version of linux. ctype is handled differently now and references to this internal array are no longer supported in newer versions of glibc. If this is the case, you should be able to resolve the problem by recompiling netCDF from source on the current platform. --------------------------------------------------------------- David Wojtowicz, Sr. Research Programmer Dept of Atmospheric Sciences, University of Illinois davidw@xxxxxxxx (217) 333-8390 ----- Original Message ----- Cc: <foster@xxxxxxxxxxxxxxxxxx> Sent: Tuesday, April 13, 2004 3:11 PM > > Hi netcdfgroup: > > I am compiling an f90 code that links libnetcdf.a -- the source files > compile fine using pgf90, but I get the following problem when linking: > > > /opt/local/lib/libnetcdf.a(string.o)(.text+0x37): In function `NC_check_name': > : undefined reference to `__ctype_b' > gmake: *** [tiegcm1] Error 2 > (suncat) tiegcm : > > > This is on the following Linux system: > > (suncat) include : uname -a > Linux suncat 2.4.20-30.9smp #1 SMP Wed Feb 4 20:36:46 EST 2004 i686 i686 i386 > GNU/Linux > > This system does have a ctype.h in /usr/include, which has __ctype_b as follows: > > (suncat) include : pwd > /usr/include > (suncat) include : fgrep __ctype_b ctype.h > extern __const unsigned short int **__ctype_b_loc (void) > ((*__ctype_b_loc ())[(int) (c)] & (unsigned short int) type) > ((locale)->__ctype_b[(int) (c)] & (unsigned short int) type) > (suncat) include : > > BTW, I am using the following in the Makefile: > > FC = pgf90 > FFLAGS = -I/opt/local/include -Msecond_underscore > LIBS = -L/opt/local/lib -lnetcdf > LDFLAGS > > > Thanks for any help on this, > > --Ben > > > > ----------------------------------------------------------------------- > Ben Foster High Altitude Observatory (HAO) > foster@xxxxxxxx phone: 303-497-1595 fax: 303-497-1589 > Nat. Center for Atmos. Res. P.O. Box 3000 Boulder CO 80307 USA > ----------------------------------------------------------------------- > >
netcdfgroup
archives: