Like to add that I've tried installing the following:

libx11-dev
xlibs-static-dev

through ubuntu synaptic manager but the problem persist...

I'm using ubuntu 8.04.