📅 2015-Aug-25 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ cmake, glfw, glut, ldconfig ⬩ 📚 Archive
GLFW is a library for OpenGL created by Camilla Berglund. It is a modern replacement to GLUT, to draw windows and handle input.
Ubuntu ships with an ancient version of GLFW that can be installed easily:
$ sudo apt install libglfw-dev
However, it is highly recommended to use GLFW 3.x. It has a different API and your source code and build options will need to be changed to use it.
To remove this ancient GLFW:
$ sudo apt remove libglfw-dev glfw2
I like to install GLFW from Github. You could also get one of its stable releases, the installation steps would be the same for either.
$ git clone https://github.com/glfw/glfw.git
$ cd glfw $ mkdir build $ cd build $ cmake -D BUILD_SHARED_LIBS=ON ..
$ sudo make install
Note that I highly recommend using checkinstall as described here instead of doing this.
libglfw.soshared library file can be loaded at runtime:
$ sudo ldconfig
If you do not do this, you get an error similar to that described here.
-lglfwto your build options or CMake.
Tried with: GLFW 20150825 and Ubuntu 14.04