I’m learning opengl and so i’m trying to get a project setup with glfw and glew on linux but im having some issues.
This is how i went about installing glfw: I first cloned the glfw repository from github and then installed the dependencies using the following command:
sudo apt install xorg-dev
I then went in to the glfw folder and typed:
cmake -DBUILD_SHARED_LIBS=ON .
This generated a makefile. I then typed:
make all &
I then wrote a small c++ program that just consist of main and a call to glfwInit(), nothing else.
When i compile the program using the following command:
g++ mainer.cpp -Wall -lglfw
I get no errors, but when i try to run it i get the following:
./a.out: error while loading shared libraries: libglfw.so.3: cannot open shared object file: No such file or directory
Oddly enough, when i remove the glfwInit() call, it works fine?
Does anybody know what is going on and what i’m doing wrong for this to happen?
Thank in advance!