Why SDL defines main macro?

Per the SDL Windows FAQ: You should be using main() instead of WinMain() even though you are creating a Windows application, because SDL provides a version of WinMain() which performs some SDL initialization before calling your main code. If for some reason you need to use WinMain(), take a look at the SDL source code … Read more

int main() vs void main() in C [duplicate]

The overwhelming majority of the time, one of int main(void) or int main(int argc, char* argv[]) is what you need to use. In particular, if you’re writing a program that’s going to be compiled by any major compiler for running on a personal computer, with the full set of the C standard libraries, then you … Read more

“Error: Main method not found in class MyClass, please define the main method as…”

When you use the java command to run a Java application from the command line, e.g., java some.AppName arg1 arg2 … the command loads the class that you nominated and then looks for the entry point method called main. More specifically, it is looking for a method that is declared as follows: package some; public … Read more