在Ubuntu中找不到X11/Xlib.h [英] X11/Xlib.h not found in Ubuntu

查看:774
本文介绍了在Ubuntu中找不到X11/Xlib.h的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Linux上使用open gl编写一个相当琐碎的程序,但是在编译时它说:

I'm trying to write a rather trivial program using open gl on linux, but at a compile time it says:

编译thumb:egl< = cuberenderer.c 在包含的文件中 /path/include/egl.h:36, 从/path/cuberenderer.c:7: /path/include/eglplatform.h:89:22: 错误:X11/Xlib.h:没有这样的文件或 目录 /path/include/eglplatform.h:90:23: 错误:X11/Xutil.h:没有这样的文件或 目录

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完全陌生,不知道出了什么问题.

I'm totally new to GL and have no idea what's wrong.

推荐答案

使用...进行快速搜索

A quick search using...

apt search Xlib.h

打开软件包libx11-dev,但是对于纯OpenGL编程而言,您不需要此软件包.您正在使用什么教程?

Turns up the package libx11-dev but you shouldn't need this for pure OpenGL programming. What tutorial are you using?

您可以通过运行以下命令将Xlib.h添加到系统中...

You can add Xlib.h to your system by running the following...

sudo apt install libx11-dev

这篇关于在Ubuntu中找不到X11/Xlib.h的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆