Running without main() function?

In user’s guide v5_20, at chapter of “Writing a Graphical User Interface”

For a standalone version, there are two examples, example2a.cxx and example2b.cxx, respectively.

In example2b.cxx, there is no main() function.
Is it possible to run without main() function?
I got some errors caused by missing main() function.

By the way, in example2a.cxx, there is main() function.


Creating a standalone application requires a main() function (main application entry point), as any regular application (nothing to do with ROOT).
The example2b is just showing the difference of inheriting MyMainFrame from TGMainFrame, instead of calling the RQ_OBJECT(“MyMainFrame”) macro.