Win32 and similar project, the entry point is
Right-click on the Project (not the reSolution) on the left side.
Then click on Properties -> Configuration Properties -> Linker -> System
In case it tells
Subsystem Windows your entry point must be WinMain(), for example
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nShowCmd)
your code here ...
Furthermore, speaking of the comments. This is a compile (or more rightly a Link) error, not a run-time error. At the time you begin to debug, the compiler requires to make a complete program (not only to compile your module) and that is when the error happens.
It does not yet get to the point being loaded and run.
It cant trace the entry point for your program, in this instance
main(). Your linker settings are perhaps incorrect.
In my instance, the program was running fine, however after one day, I only ran into this issue without doing anything…
The solution was to manually include 'Main' as the Entry Point (prior editing, the area was empty):
Alter it to Console (/SUBSYSTEM:CONSOLE) it will perform
Ensure to double check your "Active Configuration" (Debug / Release), to view in case you are really building a DLL.
In case project is made as Win32 Project this linker option will be automaticly fixed:
File – New Project . – Visual C++ – Win32 – Win32 Project
In case projec is made as General Empty Project this linker option requires to be manually included:
RC on ProjectName – Properties – Configuration Properties – Linker – Coommand Line
More Options: /SUBSYSTEM:WINDOWS