david@ms.uky.edu (David Herron -- Resident E-mail Hack) (09/22/87)
Problem: In trying to link "sc" (posted recently to comp.sources.unix) I got the following unknown symbols: stdscr wmove, wclrtoeol, wclrtobot, wstandout, wstandend waddstr, clearok, wclear, wgetch, mvprintw These are all nice standard curses things. Grepping in /lib/shlib.ifile I find that those guys aren't listed in there. These guys *are* in /usr/lib/libcurses.a, but if I include this in the linking I get lots and lots of redefined symbols. If I do something else, namely extract the following files from libcurses.a: move.o, cleartoeol.o, clrtobot.o, standout.o, addstr.o, clearok.o clear.o, getch.o, mvprintw.o I get other undefined symbols. I'm sure if I iterate through this some more I'll end up snarfing up all of libcurses.a... sigh. Diagnosis: Well, obviously shlib doesn't have everything... Fix: I've got lots of suggestions: 1. Split shlib out into a number of libraries, shcurses, shc, shm, etc. 2. Set things up like on SysVr3 with -lc_s and friends. 3. Put *all* of libcurses.a into shlib. Any other suggestions? -- <---- David Herron, Local E-Mail Hack, david@ms.uky.edu, david@ms.uky.csnet <---- {rutgers,uunet,cbosgd}!ukma!david, david@UKMA.BITNET <---- <---- Je parle francais comme une vache espagnole.
dhb@rayssd.RAY.COM (David H. Brierley) (09/25/87)
In article <7332@e.ms.uky.edu> david@ms.uky.edu (David Herron -- Resident E-mail Hack) writes: >In article <1764@crash.CTS.COM> ford@crash.CTS.COM (Michael Ditto) writes: >>In article <7306@e.ms.uky.edu> david@ms.uky.edu (David Herron -- Resident E-mail Hack) writes: >>>Problem: In trying to link "sc" (posted recently to comp.sources.unix) >>> I got the following unknown symbols: >>The shared library on the Unix PC does not include curses. Instead, it >>includes the TAM (Terminal Access Method) library, which supports a small >>subset of curses functions. All I can suggest as a fix is to include >>-lcurses before the shared library, and to make your own copy of >>/lib/shlib.ifile that does not have the conflicting symbols from -ltam. > >But that's just stupid hacking ... > >the manual claims it includes curses for me ... hence my posting. What release of the system are you using? I have release 3.51 and may manual does NOT say that the shared library inlcudes -lcurses. It says it includes the regular library, -ltam, and -ltermlib. The tam library includes similar routines to the curses library and unfortunately they have the same names. This means that the curses library CANNOT be included because of the name conflicts with tam. The only solutions that I have found are to not use the shared library if you really need all those routines from the curses library or to convert the program to using the tam routines. Converting to the tam routines is probably better (although less portable) because the tam routines are probably faster than the curses routines. As a side note, I have found that even if you pay close attention to what is supposed to be in the shared library and what is not (i.e. tam vs curses), there are still some things missing from the shared library. I have run across a few of them, the most recent one being "setvbuf". The "setvbuf" routine is documented on the same page as the "setbuf" routine and is in the standard library (libc.a) but is not in the shared library! At least, it's not listed in shlib.ifile. I can live with not having the curses library in there but having random pieces of libc.a missing is very frsutrating. -- David H. Brierley Raytheon Submarine Signal Division 1847 West Main Road Portsmouth, RI 02871 Phone: (401)-847-8000 x4073 Internet: dhb@rayssd.ray.com Uucp: {cbosgd, gatech, linus, mirror, necntc, uiucdcs} !rayssd!dhb