<command-line>:0:1: error: macro names must be identifiers ........ Solution for this error?

<command-line>:0:1: error: macro names must be identifiers ........ Solution for this error?

我正在尝试将 ssd1963 LCD 与 Raspberry Pi3 型号 B+ 连接起来,方法是遵循 Github.

上的指南

https://github.com/matusnovak/rpi-tftgl

在尝试在 rpi-tftgl/tftgl 目录中安装为 rpi-tftgl 提供的 makefile 时,我在执行 运行 make 命令时遇到此错误。 这是我捕获的 pi 终端 window 图像的 link,显示了确切的错误:

以下是我在执行 make 命令时收到的错误:

gcc -c src/tftgl.c -o src/tftgl.o -I/opt/vc/include -I. -Iinclude -D:0 -O3
<command-line>:0:1: error: macro names must be identifiers
Makefile:18: recipe for target 'src/tftgl.o' failed
make: *** [src/tftgl.o] Error 1

我能否获得针对此问题的解决方案或针对任何其他来源或 link 的任何建议,我可以按照这些建议与 Raspberrypi3 启用触摸功能的 ssd1963 LCD 接口。 添加 makefile,

 CC=gcc
 AR=ar
 DISPLAY?=ERROR
 CFLAGS=-I/opt/vc/include -I. -Iinclude -D$(DISPLAY) -O3
 prefix?=/usr/local

 .PHONY: default all clean

  default: tftgl
  all: default

  tftgl: libtftgl.a

  libtftgl.a: src/tftgl.o
     $(AR) rcs libtftgl.a src/tftgl.o

  src/tftgl.o: src/tftgl.c src/tftgl_ssd1963.h src/tftgl_ads7843.h
     $(CC) -c src/tftgl.c -o src/tftgl.o $(CFLAGS)

  install: tftgl
     install -m 0755 libtftgl.a $(prefix)/lib
     install -m 0644 include/tftgl.h $(prefix)/include

  clean:
     -rm -f src/*.o
     -rm -f libtftgl.a

我在这里提供 link 到 tftgl.c, https://github.com/matusnovak/rpi-tftgl/blob/master/tftgl/src/tftgl.c

Makefile 的(作者)没有考虑到环境变量 DISPLAY 可以定义为宏定义之外的其他东西。由于没有记录您是否需要定义它以及如何定义它,因此您最好的办法是 make 取消设置变量:

(unset DISPLAY; make)

如果您想更改 makefile,只需从 DISPLAY?=ERROR 中删除 ?,留下 DISPLAY=ERROR