编译ncurses-5.9出错

发布于:2022-12-29 ⋅ 阅读:(933) ⋅ 点赞:(0)

1.编译linux内核时想使用图形化内核配置界面,需要下载ncurses-5.9.tar.gz:

                   tar zxvf ncurses-5.9.tar.gz

                   cd ncurses-5.9

                   ./configure                        //此处出错

                   make

                   make install

./configure步骤中出错内容如下:

In file included from ../ncurses/curses.priv.h:283:0,
                 from ../ncurses/lib_gen.c:19:
_11707.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/zw/ncurses-5.9/ncurses'
Makefile:109: recipe for target 'all' failed
make: *** [all] Error 2
 

 

参考帖子内容:Ncurses 6.0 Compilation Error - error: expected ')' before 'int' - Stack Overflowicon-default.png?t=M7J4https://stackoverflow.com/questions/37475222/ncurses-6-0-compilation-error-error-expected-before-int

export CPPFLAGS="-P"

然后重新:

                   ./configure                  

                   make

                   make install

编译成功。

本文含有隐藏内容,请 开通VIP 后查看

网站公告

今日签到

点亮在社区的每一天
去签到