[Integration Kit Contents] [Integration Kit What's New] [Integration Kit Function Index] [More Documentation] [PTC]

Lisp Compilation

compile-file

COMPILE-FILE  [function]

(compile-file input-pathname :verbose verbose 
                             :print print :external-format external-format)
Description:
The Lisp source file is compiled and written as a binary object file. The Lisp source file should end with the suffix .lsp and should be loaded into Creo Elements/Direct Modeling before you compile it.

Note: To compile LISP code into a binary object, you have to have an appropriate C++ compiler and its environment installed.

Parameters:
input-pathname
must be a valid file specifier, such as a pathname. The defaults for input-pathname are taken from the variable *default-pathname-defaults*. The file should be a Lisp source file.
:verbose
defaults to the value of *compile-verbose*, if true, permits compile-file to print a message in the form of a comment to *standard-output* indicating what file is being compiled and other useful information.
:print
defaults to the value of *compile-print*, if true, causes information about top-level forms in the file being compiled to be printed to *standard-output*. Exactly what is printed is implementation-dependent; nevertheless something will be printed.
:external-format
Specifies the encoding of the Lisp file which is to be compiled. See (open) for a list of supported encoding specifications. If no external format is specified, :default is assumed.

Return Value:
output-file - truename of the output file
nil - output-file could not be created

Example:
(compile-file "var/mod1/action1.lsp")       
[Integration Kit Contents] [Integration Kit What's New] [Integration Kit Function Index] [More Documentation] [PTC]
© 2018 Parametric Technology GmbH
(a subsidiary of PTC Inc.), All Rights Reserved