我正在尝试在 linux 上使用 open gl 编写一个相当简单的程序,但在编译时它说:
Compile thumb : egl <= cuberenderer.c In file included from /path/include/egl.h:36, from /path/cuberenderer.c:7: /path/include/eglplatform.h:89:22: error: X11/Xlib.h: No such file or directory /path/include/eglplatform.h:90:23: error: X11/Xutil.h: No such file or directory
我对 GL 完全陌生,不知道出了什么问题。
最佳答案
使用...进行快速搜索
apt search Xlib.h
打开包 libx11-dev 但你不应该需要它来进行纯 OpenGL 编程。你用的是什么教程?
您可以通过运行以下命令将 Xlib.h 添加到您的系统中...
sudo apt install libx11-dev
关于linux - 在 Ubuntu 中找不到 X11/Xlib.h,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5299989/