logtalk_compile/1

Description

logtalk_compile(File)
logtalk_compile(Files)

Compiles to disk a source file or a list of source files using the default compiler flags specified in the Logtalk configuration file. The Logtalk source file name extension (by default, .lgt) must be omitted. Note that the argument is a file name or a list of file names, not file paths. In other words, the files must exist in the current working directory, unless library notation is used.

Note that only the errors related to problems in the predicate argument are listed below. Other exceptions may be thrown by the compiler if any of the compiled entities contain syntax errors.

Template and modes

logtalk_compile(@source_file_names)

Errors

File is a variable:
instantiation_error
Files is a variable or a list with an element which is a variable:
instantiation_error
File, or an element File of the Files list, is neither a variable nor a source file name:
type_error(source_file_name, File)
File, or an element File of the Files list, is a compound term but not a library name:
type_error(library_name, File)
File or an element File of the Files list does not exist in the current working directory or in the specified library directory:
existence_error(file, File)
Source file library does not exist:
existence_error(library, Library)

Examples

| ?- logtalk_compile(set).

| ?- logtalk_load(types(tree)).

| ?- logtalk_compile([listp, list]).