Stewart C. Strait wrote: > I'm trying to link an ncurses C application that built ok on RH 7, > but on Ubuntu 7.10 I get the fatal link error: > > undefined reference to '__ctype_b' > > I wrote the application myself--it's the first one of my 3 self-written > ncurses applications that I've tried to rebuild. None of them have > caused any problems on RH 7 or earlier. I could make my source > code available, but I doubt I'm doing anything unusual. > > The reference is in ncurses.h and so many people are having > problems with that reference that I'm getting lost trying to use Google. > Does anyone have any advice or, better, know offhand a good way > to prevent this? Even installing the packages needed to build some > other ncurses application might work. > > I have installed the packages > > libc6-dev > libncurses5-dev > build-essential > > in that order. > > curses-base and curses-dev won't install because they are already somehow > present. > > I have the impression that the latest ncurses and the latest glibc are > incompatible and it won't be fixed soon. > > A claimed fix, but perhaps not general purpose is: > > http://oss.sgi.com/archives/info-inventor-dev/2004-02/msg00004.html > > Two voluminous and perhaps less useful references: > > http://www.bic.mni.mcgill.ca/pipermail/minc-users/2004-May.txt > http://bugs.debian.org/cgi-bin/pkgreport.cgi?src=ncurses >
I have no idea whether this is your problem, but it seems it might be related. I went hunting around for library files containing (defining) the symbol __ctype_b and find it in /lib64/libc.so.6| /lib/libc.so.6| I used nm -D to list symbols and made sure of a 'D' flag in the output. If you have libc with __ctype_b but ncurses doesn't find it, maybe you need to get the ncurses source package and recompile locally. Probably need deb/ubu guru-advice for that. In my experience (from a few years ago) ncurses is somewhat fussy to build, so be prepared. Regards, ..jim -- [email protected] http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg
