社区
Linux/Unix社区
帖子详情
没有curses.h头文件怎么办?
wingyip
2009-08-04 10:35:26
我在编写一个程序,编译出错提示:错误: curses.h:没有该文件或目录
#include<stdio.h>
#include<curses.h>
int main()
{
initscr();
clear();
move(10,20);
addstr("Hello,world");
move(20-1,0);
refresh();
getch();
endwin();
return 0;
}
...全文
3543
14
打赏
收藏
没有curses.h头文件怎么办?
我在编写一个程序,编译出错提示:错误: curses.h:没有该文件或目录 #include #include int main() { initscr(); clear(); move(10,20); addstr("Hello,world"); move(20-1,0); refresh(); getch(); endwin(); return 0; }
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
14 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
hello__world_
2011-11-24
打赏
举报
回复
链接那个头文件吧[Quote=引用 10 楼 china_ludawei 的回复:]
多谢了。
[/Quote]
hello__world_
2011-11-24
打赏
举报
回复
谢谢啊 呵呵 我也遇到这个问题了
最后一个菜鸟
2011-06-21
打赏
举报
回复
-lncurse是什么意思
china_ludawei
2011-06-08
打赏
举报
回复
多谢了。
ruanjianxz
2011-01-04
打赏
举报
回复
十分感谢 我的也解决了
j200300
2010-06-16
打赏
举报
回复
我也有相同的問題><
wingyip
2009-08-04
打赏
举报
回复
好的 多谢多谢
Jagen在路上
2009-08-04
打赏
举报
回复
你的编译选项后面加上-lncurses
wingyip
2009-08-04
打赏
举报
回复
按照楼上的命令成功安装了
还是编译不通过
错误:
7_2_hello2.c:(.text+0x12): undefined reference to `initscr'
7_2_hello2.c:(.text+0x17): undefined reference to `stdscr'
7_2_hello2.c:(.text+0x1f): undefined reference to `wclear'
7_2_hello2.c:(.text+0x36): undefined reference to `stdscr'
7_2_hello2.c:(.text+0x49): undefined reference to `wmove'
7_2_hello2.c:(.text+0x58): undefined reference to `stdscr'
7_2_hello2.c:(.text+0x64): undefined reference to `stdscr'
7_2_hello2.c:(.text+0x7c): undefined reference to `waddnstr'
7_2_hello2.c:(.text+0x81): undefined reference to `stdscr'
7_2_hello2.c:(.text+0x8f): undefined reference to `stdscr'
7_2_hello2.c:(.text+0xa7): undefined reference to `waddnstr'
7_2_hello2.c:(.text+0xb0): undefined reference to `LINES'
7_2_hello2.c:(.text+0xbe): undefined reference to `stdscr'
7_2_hello2.c:(.text+0xc6): undefined reference to `wrefresh'
7_2_hello2.c:(.text+0xcb): undefined reference to `stdscr'
7_2_hello2.c:(.text+0xd3): undefined reference to `wgetch'
7_2_hello2.c:(.text+0xd8): undefined reference to `endwin'
Jagen在路上
2009-08-04
打赏
举报
回复
应该是apt-get install libncurses5-dev
wingyip
2009-08-04
打赏
举报
回复
按照的命令 sudo了一遍 得到下面的提示,重新编译了一遍程序还是提示同样的错误
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
E: 无法找到软件包 libcurses5-dev
ShowMan
2009-08-04
打赏
举报
回复
装libcurses包
apt-get install libcurses5-dev
curses
.h文件
curses
文件
Linux下c语言的图像编程—
curses
Linux下c语言的图像编程—
curses
curses
将一些如方向键等特殊控制字元, 以 KEY_ 为开头定义在
curses
.h。这个
头文件
里, 如 KEY_UP 即代表方向键的 " ↑ "。 但, 如果您想使用
curses
.h 所为您定义的这些特殊键的话, 您就必须将 keypad 设定为TRUE。 还有反白,高亮,闪烁等效果
curses
头文件
c++ i search for it for a long time and i am not sure it work
macOS在vscode中调用
curses
.h
头文件
报错的解决办法
macOS在vscode中调用
curses
.h
头文件
报错的解决办法 同样能够解决在vscode中使用c++11的问题
ubuntu中找不到
头文件
term.h和
curses
.h的解决方法
创建于 2012-05-16 收藏自个人的百度空间 -------------------------------- 当/usr/include中
没有
term.h和
curses
.h时,包含这两个
头文件
的程序会如下报错: term.h:
没有
那个文件或目录
curses
.h:
没有
那个文件或目录 解决方法: 安装n
curses
库(兼容
curses
库) sudo apt-get inst...
Linux/Unix社区
23,120
社区成员
74,507
社区内容
发帖
与我相关
我的任务
Linux/Unix社区
Linux/Unix社区 应用程序开发区
复制链接
扫一扫
分享
社区描述
Linux/Unix社区 应用程序开发区
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章