Try adding "-k-lGL". See my mail on fpc-pascal: there's no libglx that you should link with on Linux, glX functions are inisde libGL.so.