So you need to load the libraries in this order. "glfw, gl, xext, x11, xrandr, xxf86vm, xi, and pthread" This problem caused me hours of trouble so I hope this help someone.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
After hours of frustrating work I finally got the linker to work and compile my programs with GLFW. In this format and order of libraries.
"g++ -o dist/Debug/GNU-Linux-x86/tuxgui build/Debug/GNU-Linux-x86/main.o
pkg-config --libs glfw3
pkg-config --libs gl
pkg-config --libs xext
pkg-config --libs x11
pkg-config --libs xrandr
pkg-config --libs xxf86vm
pkg-config --libs xi
-lpthread"So you need to load the libraries in this order. "glfw, gl, xext, x11, xrandr, xxf86vm, xi, and pthread" This problem caused me hours of trouble so I hope this help someone.
If you are using the static version of the GLFW library then you need to use the
--static
flag.