Build it as a Windows application instead and use WinMain instead of main.