使用 TDM GCC 5.1.0 编译 PDCurses36 时出错

Error when Compiling PDCurses36 with TDM GCC 5.1.0

本文关键字:编译 PDCurses36 出错 TDM GCC 使用      更新时间:2023-10-16

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

C:Program Files (x86)CodeBlockspdcurs36wincon>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:...CodeBlocksMinGWbin
cd C:...pdcurs36wincon
mingw32-make -f Makefile

我目前正在使用官方网站提供的存储库中的 TDM GCC 5.1.0(代码块 17.12 的二进制构建提供的内容(和 pdcurs36.zip。 我的操作系统是Windows 10。

任何帮助将不胜感激。

编辑我的意思是代码块的版本 17.12

我没有足够的代表来评论,但你可能对这个 PDCurses 对 pdcdisp.c 的承诺感兴趣。

旧编译器上的警告;将 COMMON_LVB_* 替换为数字 安抚一些老编译器。在西蒙·索比施之后。

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

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