Try to add {$L glx.so} somewhere in the code and remove the compiler option -k-lglx