Forgot to link libraries. Ah, the problems of cut&paste :)