Troubleshoot cannot find main function

Did you choose Win32 Dynamic-Link Library when starting a new project?