Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!think.com!hsdndev!husc3.harvard.edu!husc10.harvard.edu!king1 From: king1@husc10.harvard.edu (Gary King) Newsgroups: comp.lang.c++ Subject: C++ Curses and g++ Summary: linker says _unctrl undefined Keywords: curses g++ c++ Message-ID: <1991May3.223818.838@husc3.harvard.edu> Date: 4 May 91 02:38:17 GMT Sender: Gary King Followup-To: king1@husc7.harvard.edu Organization: Harvard University Science Center Lines: 31 Nntp-Posting-Host: husc10.harvard.edu I'm writing a c++ program that does screen manipulation and am unable to tie curses in with it. I compile using: g++ -o name prog.c -lcurses -ltermlib and the linker complains about _unctrl being undefined. _unctrl is declared in /usr/include/curses.h (used to be in /usr/include/unctrl.h) as an external variable but I would think that it would be defined somewhere. I also wrote a little program with a declared (but *undefined*) external variable and both cc and g++ didn't mind that at all: #include /* * Used to be in unctrl.h. */ #define unctrl(c) _unctrl[(c) & 0177] extern char *_unctrl[]; extern char _c[]; main() { printf( "Now is the time\n" ); } It compiles, links and runs just fine.... So, does anyone out here in C++-guru-land have any suggestions. If I get a lot of responses and they are non-trivial, I'll post a summary. Sorry if this is an FAQ... but help! Gary