Thanks tom.

Indeed, i forgot to compile with -lX11.