使用 TDM GCC 5.1.0 编译 PDCurses36 时出错

Error when Compiling PDCurses36 with TDM GCC 5.1.0

尽管遵循 README.md 中提供的说明,但我最近一直在努力构建 pdcurses36 的源代码。无论出于何种原因,我总是会遇到与 "recipe for target 'pdcdisp.o' failed" 相同的错误。这是错误提示:

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。我的 OS 是 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 */