I've been working on the prototypes of an app that makes use of SDL and winsock libraries when I was suddenly met with this error on compilation:
LNK2019 unresolved external symbol main referenced in function "int __cdecl invoke_main(void)" (?invoke_main@@YAHXZ)
I tried changing the "SubSystem" option to Windows and Console so forth, but that only resulted in the same error with a different "unresolved external symbol WinMain" message. After some research I listened the advice of someone to change the main to wmain and voila - the app was working as intended.
What makes me curious is that I didn't change any default settings from Visual Studio except for the C++ standard (which I changed from C++11 to C++17), and my other projects that do have "Use Unicode Character Set" option turned on do work with a normal main() function. So what exactly forces me to use wmain instead of the usual main here?