Utilities for on-demand compilation of foreign files

Author(s): Manuel Carro, Jose F. Morales.

This module provides two predicates which give the user information regarding how to compile external (C) files in order to link them with the Ciao Prolog engine at runtime.

These predicates are not intended to be called directly by the end-user. Instead, a tool or module whose aim is generating dynamically loadable files from source files should use the predicates in this file in order to find out what are the proper compiler and linker to use, and which options must be passed to them in the current architecture.

Usage and interface

Documentation on exports

PREDICATE

Usage:compiler_and_opts(Compiler,Opts)

If you want to compile a foreign language file for dynamic linking in the current operating system and architecture, you have to use the compiler Compiler and give it the options Opts. A variable in Opts means that no special option is needed.

  • Call and exit should be compatible with:
    (basic_props:atm/1)Compiler is an atom.
    (basic_props:list/2)Opts is a list of atms.

PREDICATE

Usage:linker_and_opts(Linker,Options)

If you want to link a foreign language file for dynamic linking in the current operating system and architecture, you have to use the linker Compiler and gite it the options Opts. A variable in Opts means that no special option is needed.

  • Call and exit should be compatible with:
    (basic_props:atm/1)Linker is an atom.
    (basic_props:list/2)Options is a list of atms.