|
installed ncurses-5.4 just a moment ago, the ncurses file's path is :
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
/usr/local/include;
/usr/local/lib ;
/usr/local/man.....
...........
the test program source code like this:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <curses.h>
#include <unistd.h>
using namespace std;
int main()
{
printf("%c[%d;%dH",27,10,10);
cout << "where am i" << endl;
if (initscr()==NULL){
cerr << "initscr" << endl;
return -1;
}
printw("this is a test program, bye bye");
refresh();
endwin();
return 0;
}
compiled error information is :
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
dow2004$ g++ cursor_test.cpp -o cursor_test
/tmp/cczbeiZE.o: In fuction 'main':
/tmp/cczbeiZE.o(.text+0x42): undefined reference to 'initscr'
/tmp/cczbeiZE.o(.text+0x89): undefined reference to 'printw'
/tmp/cczbeiZE.o(.text+0x91): undefined reference to 'refresh'
/tmp/cczbeiZE.o(.text+0x96): undefined reference to 'endwin'
collect2: ld returned 1 exit status
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
what wrong ? someone expert , could you tell me ?
please help me
addition : i have found these function (initscr(), printw(), refresh() , endwin() ) in the file-- /usr/local/include/curses.h
:help |
|