我正在尝试编写一个使用 EGL 的简单程序,但是当我包含 bcm_host.h 时,gcc 说它不存在,所以我将 /opt/vc/include 添加到 makefile 中,它说缺少另一个标头,我添加了另一个目录,现在,在 6 个文件夹之后,我真的不想再这样做了,但 gcc 想要更多。我查看了 /opt/vc/src/hello_pi/Makefile.include 文件,它只添加了 3 个文件夹。所以问题是:我做错了什么?
这是生成文件:
LIB_DIR = -L/opt/vc/lib
INCLUDE_DIRS = -I/opt/vc/include -I/opt/vc/include/interface/vcos/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmc_host/linux -I/opt/vc/include/interface/vmcs_host -I/opt/vc/include/interface/vchi -I/usr/include/SDL -I-
LIBS = -lSDL
bin:
gcc $(LIB_DIRS) $(INCLUDE_DIRS) $(LIBS) main.c