I hope someone can help/guide me here. I had a working application, but today I keep getting the following error:
LNK2019 unresolved external symbol main referenced in function "int __cdecl invoke_main(void)" (?invoke_main@@YAHXZ)
The only thing that changed was that I updated VS2017 15.5.4 to VS2017 15.6.1 (latest). I been reading here and there, and I believe somewhere some setting may have changed and now the program is failing to "see" the main function. For the record, I did try this code in my laptop which still has VS2017 15.5.4 and ran without any issues. Any idea what it may be?
Check your project config.
Right-click the project -> Properties -> Linker -> System -> SubSystem.
You probably want that to be set to Windows (/SUBSYSTEM:WINDOWS)
I couldn't find a fix to it. I had to make a new project and move everything there.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With