ncurses移植错误问题

错误代码:


lzb1604@ubuntu:~/linux/tool/ncurses-6.0$ make
cd man && make DESTDIR="" RPATH_LIST="/home/lzb1604/linux/tool/ncurses/lib" all
make[1]: Entering directory '/home/lzb1604/linux/tool/ncurses-6.0/man'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/lzb1604/linux/tool/ncurses-6.0/man'
cd include && make DESTDIR="" RPATH_LIST="/home/lzb1604/linux/tool/ncurses/lib" all
make[1]: Entering directory '/home/lzb1604/linux/tool/ncurses-6.0/include'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/lzb1604/linux/tool/ncurses-6.0/include'
cd ncurses && make DESTDIR="" RPATH_LIST="/home/lzb1604/linux/tool/ncurses/lib" all
make[1]: Entering directory '/home/lzb1604/linux/tool/ncurses-6.0/ncurses'
arm-linux-gnueabihf-gcc -DHAVE_CONFIG_H -I. -I../include  -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64  -DNDEBUG -O2 --param max-inline-insns-single=1200 -fPIC -c ../ncurses/lib_gen.c -o ../obj_s/lib_gen.o
In file included from ./curses.priv.h:325:0,
                 from ../ncurses/lib_gen.c:19:
_40517.c:843:15: error: expected ‘)’ before ‘int’
../include/curses.h:1631:56: note: in definition of macro ‘mouse_trafo’
 #define mouse_trafo(y,x,to_screen) wmouse_trafo(stdscr,y,x,to_screen)
                                                        ^
Makefile:966: recipe for target '../obj_s/lib_gen.o' failed
make[1]: *** [../obj_s/lib_gen.o] Error 1
make[1]: Leaving directory '/home/lzb1604/linux/tool/ncurses-6.0/ncurses'
Makefile:113: recipe for target 'all' failed
make: *** [all] Error 2


根据错误找到:
extern NCURSES_EXPORT(bool)    wmouse_trafo (const WINDOW*, int*, int*, bool);
extern NCURSES_EXPORT(bool)    mouse_trafo (int*, int*, bool);   /* generated */


查找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

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值