Node:User-defined Main Programs, Next:Generic Runtime Systems under Windows, Previous:The Application Builder, Up:Stand-alone Executables
Runtime systems may or may not have an automatically generated
main program. This is controlled by the --main option to
spld. If --main=user is given, a function
user_main() must be supplied:
int user_main(int argc, char *argv[])
user_main() is responsible for initializing the Prolog engine,
loading code, and issuing any Prolog queries. An
alternative is to use --main=none and write your own
main() function.