Next: , Previous: The Application Builder, Up: Stand-Alone Executables


6.7.4 User-defined Main Programs

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.


Send feedback on this subject.