I am working on a program, and I wanted to clear the screen - (yes I read the faq, and yes I searched the boards) - I have come up with a suitable method of clearing the screen (I don't need it to be portable, as the program is strictly for my own use). Anyway, I tried using Hammer's solution from the faq:
But the compiler (gcc) fed me this:Code:#include <curses.h> void clrscr(void) { static int init; if (init == 0) { initscr(); init = 1; } clear(); refresh(); }
So then I read about the clear() function (?) as well as werase() and so from the man pages, and thought that they looked like my solution, but I got this when I used clear():/tmp/ccSsrP07.o: In function `clrscr':
87: undefined reference to `initscr'
91: undefined reference to `stdscr'
91: undefined reference to `wclear'
92: undefined reference to `stdscr'
92: undefined reference to `wrefresh'
collect2: ld returned 1 exit status
I don't suppose somebody could explain all of this to me, as to why the two functions I tried would not work?/tmp/ccy5cjO5.o: In function `primary_menu':
53: undefined reference to `stdscr'
53: undefined reference to `wclear'
collect2: ld returned 1 exit status
~/



LinkBack URL
About LinkBacks


