Do it in this order:
-lglfw3 -lGLU -lGL
Instead of this one:
-lGL -lGLU -lglfw3
GCC is very sensitive to the order in which you specify libraries during the linking stage. For example, if libA.a
depends on libB.a
, then you'd have to invoke linker in the following way:
gcc ... -lA -lB ...
In your case, libglfw3.a
obviously depends on libGL.a
, hence the errors you are getting.