linux - 在 Ubuntu 中找不到 X11/Xlib.h

标签 linux opengl-es compiler-errors

我正在尝试在 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/

相关文章:

regex - 用于 CSV 校正的 Perl REGEX 模式

java - 如何在 Linux Mint 中为 Intellij 创建菜单项?

android - 为什么我的 OpenGL 球体看起来像一个椭圆

c - 这个程序的输出是什么意思?

linux - emacsclient:无法获取终端名称

java - OpenGL2.0教程的示例代码在运行时崩溃

android - 旋转 Open GL 顶点数组中的单个多边形?

assembly - 汇编程序消息->错误: register number out of range

python - TypeError : “NoneType” object is not iterable

c++ - 缺少代码 :blocks 的库