Reference URL:http://ubuntuforums.org/showthread.php?t=345177
1) sudo apt-get update
-This will update your apt database to the most recent available packages.
2) sudo apt-get install build-essential
- This installs the necessary development tools for building source code.
3) sudo apt-get install freeglut3-dev
- This installs the development libraries and headers for freeglut.
4) 使用 “ gcc 文件名称 -lglut -lGL -lGLU ” 命令来编译文件。
如果没报错, 就说明环境OK了。