| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
This document explains how to build and/or install GLFW on various operating systems and distributions.
ArrayFire requires GLFW (>=3.1.2) for graphics support. GLFW v3.0.4 will also work, but is not recommended as bug fixes following that release may create problems. Whatever you do, do not install GLFW 2!
It is highly recommended to simply download the GLFW 64-bit binaries for Windows from the GLFW website.
Install GLFW using Homebrew like so:
brew tap homebrew/versions brew install glfw
Most new Linux distributions have GLFW in their respective package manager. Common package names are:
Some of the older Linux distributions do not ship with GLFW 3.x. The solution to this is to use 3rd party package manager repositories to install GLFW or build it as shown below. You can search the internet for repositories with GLFW 3 that support your distribution.
GLFW on Linux depends on X.Org Server and GLU (OpenGL Utility Library) packages. To build GFLW, you will also need gcc and cmake.
For Debian based systems:
sudo apt-get install build-essential cmake cmake-curses-gui xorg-dev \
libglu1-mesa-dev libxinerama-dev libxcursor-devFor Redhat / CentOS systems:
sudo yum install gcc gcc-c++ cmake xorg-x11-server-devel \
xorg-x11-server-utils libXrandr-devel \
libXi-devel libXinerama-devel libXcursor-develOnce the dependencies are installed, glfw3 can be built and installed using the following commands:
wget https://github.com/glfw/glfw/archive/refs/tags/3.3.4.zip -O glfw-3.3.4.zip
unzip glfw-3.3.4.zip
cd glfw-3.3.4
mkdir build
cd build
cmake .. -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release
make -j8
sudo make installAfter installation, make sure you add the following to the end of your bash config file.
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
| Back | FazBrowse Home | New Git URL |