You need a few external libraries, SFML is not just plain standard C++
From what I see, you need at least Xlib and GLX development libraries.
But normally there's a ./configure which checks for those libraries ^^
However:
I just wanted to say, that I'm also using Ubuntu 8.04 with Compiz Fusion and I never had graphical problems(however, the sound isn't working, but that's another topic). It worked with activated compiz as well as with metacity.