curese是实现unix/linux字符界面下图形界面的一种库(个人理解)
要利用curese库,必须安装它,在debian下可以这样做:
apt-get update
apt-get install libncurses5 libncurses5-dbg libncurses5-dev libncursesw5 libncursesw5-dbg libncursesw5-dev
编写 hello world 程序检验:
//hello.c
引用:#include
int main()
{
initscr(); /* Start curses mode */
printw("Hello World !!!"); /* Print Hello World */
refresh(); /* Print it on to the real screen */
getch(); /* Wait for user input */
endwin(); /* End curses mode */
return 0;
}
编译
gcc hello.c -lncurses -o hello
运行
./hello