Trying to fix undefined reference to symbol 'XGrabPointer'

/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: note: 'XGrabPointer' is defined in DSO /usr/lib64/libX11.so.6 so try adding it to the linker command line