Ncurses 6.0 Compilation Error - error: expected ')' before 'int'

参考 这里 这里

Problem description

Trying to install ncurses 6.0 on Ubuntu 16.04 LTS is failing with a compilation error:

In file included from ./curses.priv.h:325:0,
                 from ../ncurses/lib_gen.c:19:
_24273.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:962: recipe for target '../objects/lib_gen.o' failed
make[1]: *** [../objects/lib_gen.o] Error 1
make[1]: Leaving directory '/home/netsamir/Sofware/Tmux/ncurses-6.0/ncurses'
Makefile:113: recipe for target 'all' failed
make: *** [all] Error 2
Configuration
netsamir@octopus:~/Sofware/Tmux/ncurses-6.0$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04 LTS
Release:    16.04
Codename:   xenial

netsamir@octopus:~/Sofware/Tmux/ncurses-6.0$ gcc --version
gcc (Ubuntu 5.3.1-14ubuntu2) 5.3.1 20160413
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.

netsamir@octopus:~/Sofware/Tmux/ncurses-6.0$ cpp --version
cpp (Ubuntu 5.3.1-14ubuntu2) 5.3.1 20160413
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.

Solution

Export the variable CPPFLAGS in the shell with -P as follow

netsamir@octopus:~/$ export CPPFLAGS="-P"
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值