There are two ways to do this:
a: Add {$APPTYPE gui} to your main program file.
b: In the compiler options dialog, linking tab, target OS specific
options check Win32 gui application.
It is on by default, because Lazarus still needs much debugging.
Vincent