gpt4 book ai didi

Ncurses 6.0 编译错误 - 错误 : expected ')' before 'int'

转载 作者:行者123 更新时间:2023-12-03 11:36:28 25 4
gpt4 key购买 nike

问题描述

尝试在 Ubuntu 16.04 LTS 上安装 ncurses 6.0 失败并出现编译错误:

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

配置
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.

最佳答案

解决方案

使用 -P 在 shell 中导出变量 CPPFLAGS 如下

netsamir@octopus:~/$ export CPPFLAGS="-P"

引用

http://trac.sagemath.org/ticket/19762

关于Ncurses 6.0 编译错误 - 错误 : expected ')' before 'int' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37475222/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com