installing Freeglut on Linux

喜夏-厌秋 提交于 2020-01-02 06:20:32

问题


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

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?


回答1:


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.

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




回答2:


For installing :

  1. sudo apt-get install freeglut3 freeglut3-dev libglew-dev
  2. sudo apt-get install mesa-utils

For linking :

 g++ .... -lglut -lGL ....


来源:https://stackoverflow.com/questions/11318510/installing-freeglut-on-linux

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!