在Linux上安装Freeglut [英] installing Freeglut on Linux

查看:614
本文介绍了在Linux上安装Freeglut的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在运行Linux Mint的计算机上安装freeglut.我按照此网站上的步骤操作: http://freeglut.sourceforge.net/docs/install.php .当我在src目录中执行make all时,出现以下错误:

I am trying to install freeglut on my computer running Linux Mint. I follow the steps on this website: http://freeglut.sourceforge.net/docs/install.php. When I do make all in the src directory, it gives the following error:

fatal error: GL/gl.h

../include/GL/freeglut_std.h给出了此错误.经检查,include/GL目录确实没有任何gl.h文件.它还缺少glu.h,freeglut_std.h也尝试将其设为#include.我该怎么办?为什么缺少gl.h和glu.h?

This error was given by ../include/GL/freeglut_std.h. Upon inspection, the include/GL directory is indeed devoid of any gl.h file. It is also missing glu.h, which freeglut_std.h also tries to #include. What should I do about this? Why are gl.h and glu.h missing?

推荐答案

我建议安装freeglut3-dev软件包,而不是从源代码构建.这将为您提供有用的信息,例如自动更新以及您可以参考的正确的 pkg-config 条目在您的make文件中.

I'd recommend installing the freeglut3-dev package instead of building from source. That will give you useful stuff like automatic updates and proper pkg-config entries that you can reference in your makefiles.

如果您不愿从源代码构建Freeglut,则可能需要libgl1-mesa-dev和(也许)libglu1-mesa-dev软件包.

If you're dead-set on building freeglut from source you'll probably need the libgl1-mesa-dev and (maybe) libglu1-mesa-dev packages.

这篇关于在Linux上安装Freeglut的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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