[plug] Trying to use Curses.h

Steve Baker bakes at corona.iinet.net.au
Mon Mar 8 06:56:02 WST 1999


On Sun, 7 Mar 1999, David Buddrige wrote:

> Hi all...
> 
> 
> I'm trying to use ncurses in a program.  In order to figure it out, I am
> writing a test program.  However I am not able to figure it out - it
> keeps bringing up an error - "undefined reference to newterm"... (see my
> C++ below)...
> 
> could anyone point me towards some sample ncurses code on the net?  or
> have I forgotten something silly?  BTW, it compiles ok with the g++
> testcurses.c -c option, but when I do, g++ testcurses.c -o test it
> brings up the error message I have described - seems to be a linking
> problem, but not sure how to fix...

Try g++ testcurses.c -o test -lncurses to include the libncurses.a 
library in the link step.  I have used this successfully with gcc, not 
g++, but I assume the ld step is the same.

--
Steve Baker,  aka  bakes at corona.iinet.net.au
Open your mind, then check out http://www.peg.apc.org/~nexus
No-one can tell you exactly what you have gotta be -- Jimmy Barnes



More information about the plug mailing list