编译ncurses错误处理及解决办法
2016-08-07 17:09
831 查看
编译ncurses是编译linux内核时用到的一个工具,在make时遇到了如下错误:
根据出错提示,找到ncurses目录下,include文件夹里的curses.h文件,查找mouse_trafo,锁定在1584行
应该是由后面的一行注释引起的,具体原因不详
由于代码的部分是由另一个文件curses.tail
导入的,所以要修改curses.tail,
查找mouse_trafo,定位到104行,去除104行后面的注释
保存后退出,重新make即可
注:
编译环境:
ncurses 版本,5.9和6.0 亲测都没有问题
In file included from ../ncurses/curses.priv.h:283:0, from ../ncurses/lib_gen.c:19: _46863.c:835:15: error: expected ‘)’ before ‘int’ ../include/curses.h:1594:56: note: in definition of macro ‘mouse_trafo’ #define mouse_trafo(y,x,to_screen) wmouse_trafo(stdscr,y,x,to_screen) ^ Makefile:790: recipe for target '../objects/lib_gen.o' failed make[1]: *** [../objects/lib_gen.o] Error 1 make[1]: Leaving directory '/home/ran/workspace/ncurses-5.9/ncurses' Makefile:109: recipe for target 'all' failed make: *** [all] Error 2
根据出错提示,找到ncurses目录下,include文件夹里的curses.h文件,查找mouse_trafo,锁定在1584行
1583 extern NCURSES_EXPORT(bool) wmouse_trafo (const WINDOW*, int*, int*, bool); 1584 extern NCURSES_EXPORT(bool) mouse_trafo (int*, int*, bool); /* generated */
应该是由后面的一行注释引起的,具体原因不详
由于代码的部分是由另一个文件curses.tail
导入的,所以要修改curses.tail,
sudo vim curses.tail
查找mouse_trafo,定位到104行,去除104行后面的注释
103 extern NCURSES_EXPORT(bool) wmouse_trafo (const WINDOW*, int*, int*, bool); 104 extern NCURSES_EXPORT(bool) mouse_trafo (int*, int*, bool); /* generated */
保存后退出,重新make即可
sudo make clean sudo make sudo make install
注:
编译环境:
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.1) 5.4.0 20160609 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
ncurses 版本,5.9和6.0 亲测都没有问题
相关文章推荐
- iframe和response.sendRedirect()跳转到父页面
- HDU 1231 最大连续子序列
- Codeforces Round #365 (Div. 2) Mishka and trip
- android RelativeLayout 内容居中解决办法
- java题库4
- Leetcode题集——edit-distance
- 008——struts2的值栈
- POJ 2653 Pick-up sticks
- BDD测试利器:mocha+should.js
- 找出数组中两数之和为指定值的所有整数对
- Fragment全解析系列
- HDU 3727 Jewel 主席树
- java中代码块的执行顺序--静态代码块,构造器,普通代码块,构造块,main主函数
- 外观模式(Facade)
- 使用python修改QQ密保(脚本)
- Hive函数2.0
- $.post和String转流时引起乱码及解决办法
- QT 4.7.2的一个bug:QGLWidget::grabFrameBuffer() ignores withAlpha parameter
- xml基础知识
- liunx 下mysql 的安装