[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: undefined ref to __ctype_b (fwd)
- Subject: Re: undefined ref to __ctype_b (fwd)
- Date: Tue, 13 Apr 2004 14:51:51 -0600
------- Forwarded Message
Date: Tue, 13 Apr 2004 14:34:23 -0600
From: Ben Foster <address@hidden>
To: address@hidden
Subject: Re: undefined ref to __ctype_b
Russ, I found a libnetcdf.a in /opt/local/rh9/lib, and when
I link to that it works (altho I had to remove the -Msecond_underscore).
Thanks!
--Ben
>To: Ben Foster <address@hidden>
>Subject: Re: undefined ref to __ctype_b
>Date: Tue, 13 Apr 2004 14:26:28 -0600
>From: Russ Rew <address@hidden>
>X-Spam-Status: No, hits=-5.5 required=5.0
tests=AWL,BAYES_01,IN_REP_TO,QUOTED_EMAIL_TEXT version=2.55
>X-Spam-Level:
>X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp)
>
>>To: address@hidden
>>From: Ben Foster <address@hidden>
>>Subject: Re: 20040413: undefined ref to __ctype_b
>>Organization: NCAR/HAO
>>Keywords: 200404132011.i3DKBdCT009593
>
>Hi Ben,
>
>> 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 =
>
>I think the problem is that you just copied a libnetcdf.a built on a
>RedHat 8 system to a RedHat 9 system. Instead, I think you have to
>recompile and install the library from source for RedHat 9. See these
>previous support responses:
>
>
http://www.unidata.ucar.edu/cgi-bin/aglimpse/70?query=__ctype_b&case=on&errors=0
&maxfiles=10
>
>--Russ
-----------------------------------------------------------------------
Ben Foster High Altitude Observatory (HAO)
address@hidden phone: 303-497-1595 fax: 303-497-1589
Nat. Center for Atmos. Res. P.O. Box 3000 Boulder CO 80307 USA
-----------------------------------------------------------------------
------- End of Forwarded Message