LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 503|回复: 1

使用<curses.h>出错

[复制链接]
发表于 2007-1-6 14:26:20 | 显示全部楼层 |阅读模式
是否少include了什么文件?
记得以前用过<curses.h>  但现在没书在身边

#include <stdio.h>
#include <curses.h>

int main()
{
    clear();     //清屏
    return 0;
}

[HoHo@MIIX Desktop]$ gcc -o test test.c
/tmp/cciUrkJh.o: In function `main':test.c.text+0x12):对‘stdscr’未定义的引用
:test.c.text+0x1a):对‘wclear’未定义的引用
collect2: ld 返回 1
 楼主| 发表于 2007-1-6 15:59:54 | 显示全部楼层
原来这样   gcc - o test test.c   -lcurses
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表