messagebox is in QtGui, u need to link against them.
My suggession is u can simply print the message.

hope it helps
Bala