The whole error output being:
LNK2019 unresolved external symbol wWinMain referenced in function "int __cdecl __scrt_common_main_seh(void)" (?__scrt_common_main_seh@@YAHXZ) kachna-tracker C:\dev\kachna-tracker\MSVCRT.lib(exe_wwinmain.obj)
This is a project imported from Qt Creator, and this error only occurs when I try to build the Release version, Debug version runs just fine. As far as I can tell, besides using the debug versions of the libraries (e.g. qtmain.lib/qtmaind.lib), there is no difference in the linker configuration between the Debug and Release configurations.
I've found that this error can be fixed by setting the SubSystem to /SUBSYSTEM:CONSOLE instead of /SUBSYSTEM:WINDOWS, and this indeed does fix the issue, but as I am building a GUI application, a permanently open console window is quite unsightly, and also probably only fixes the symptom rather than the cause.
How to fix this error?