I'm trying to install [Magick Rotation](https://launchpad.net/magick-rotation). Within the steps there's a C file that I have to compile but it gives me errors.

The command I'm using is `gcc check.c` and here's the output:

```
/tmp/ccDA1vH4.o: In function `main':
check.c:(.text+0x2a): undefined reference to `XOpenDisplay'
check.c:(.text+0x89): undefined reference to `XRRSelectInput'
check.c:(.text+0xa2): undefined reference to `XNextEvent'
check.c:(.text+0xbb): undefined reference to `XRRGetScreenInfo'
check.c:(.text+0xdb): undefined reference to `XRRConfigRotations'
collect2: error: ld returned 1 exit status

```

...any idea what's wrong?