gpt4 book ai didi

c++ - 使用 TDM GCC 5.1.0 编译 PDCurses36 时出错

转载 作者:太空宇宙 更新时间:2023-11-04 12:46:51 28 4
gpt4 key购买 nike

尽管遵循了 README.md 中提供的说明,但我最近一直在努力构建 pdcurses36 的源代码。无论出于何种原因,我总是会遇到同样的错误,因为“目标 'pdcdisp.o' 的配方失败”。这是错误提示:

C:\Program Files (x86)\CodeBlocks\pdcurs36\wincon>mingw32-make -f makefile
gcc -c -O2 -Wall -I.. ../wincon/pdcdisp.c
../wincon/pdcdisp.c: In function '_new_packet':
../wincon/pdcdisp.c:211:28: error: 'COMMON_LVB_UNDERSCORE' undeclared (first use in this function)
mapped_attr |= COMMON_LVB_UNDERSCORE;
^
../wincon/pdcdisp.c:211:28: note: each undeclared identifier is reported only once for each function it appears in
../wincon/pdcdisp.c:213:28: error: 'COMMON_LVB_GRID_LVERTICAL' undeclared (first use in this function)
mapped_attr |= COMMON_LVB_GRID_LVERTICAL;
^
../wincon/pdcdisp.c:215:28: error: 'COMMON_LVB_GRID_RVERTICAL' undeclared (first use in this function)
mapped_attr |= COMMON_LVB_GRID_RVERTICAL;
^
makefile:94: recipe for target 'pdcdisp.o' failed
mingw32-make: *** [pdcdisp.o] Error 1

这些是我向命令提示符发出的命令:

set PDCURSES_SRCDIR = C:\...\pdcurs36

path = C:\...\CodeBlocks\MinGW\bin

cd C:\...\pdcurs36\wincon

mingw32-make -f Makefile

我目前正在使用 TDM GCC 5.1.0(代码块 17.12 的二进制构建提供的)和 pdcurs36.zip from the repository provided from the official site .我的操作系统是 Windows 10。

任何帮助将不胜感激。

编辑我的意思是 codeblocks 版本 17.12

最佳答案

我没有足够的代表来发表评论,但您可能对 this PDCurses commit 感兴趣到 pdcdisp.c.

warning on an old compiler; replaced COMMON_LVB_* with numbers to appease some old compilers. After Simon Sobisch.

看起来 GCC 5.1.0 只是没有定义这些宏,所以他们硬编码了这些值:

0x8000; /* COMMON_LVB_UNDERSCORE */
0x0800; /* COMMON_LVB_GRID_LVERTICAL */
0x1000; /* COMMON_LVB_GRID_RVERTICAL */

关于c++ - 使用 TDM GCC 5.1.0 编译 PDCurses36 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51143902/

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