← 返回命令列表

Linux command

ecl 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Start ECL REPL

ecl

Load and execute a file

ecl -load [file.lisp]

Evaluate expression

ecl -eval "(print \"Hello\")"

Compile file to shared library

ecl -compile [file.lisp]

Run script and exit

ecl -shell [script.lisp]

Start without initialization

ecl -norc

说明

ECL (Embeddable Common Lisp) is an implementation of Common Lisp designed to be embedded in other applications. It compiles Lisp to C, enabling integration with C libraries and native code generation. ECL supports the full ANSI Common Lisp standard with extensions for threading, FFI (Foreign Function Interface), and embedding. It can produce standalone executables and shared libraries.

参数

-load _file_
Load Lisp file.
-eval _expr_
Evaluate expression.
-compile _file_
Translate file to C and compile to a shared library (.fas).
-o _ofile_
Name the compiled shared library output file.
-c _cfile_
Name the intermediary C file and keep it after compilation.
-h _hfile_
Name the intermediary C header file and keep it after compilation.
-data _datafile_
Dump compiler data into datafile.
-s
Produce a linkable object file instead of a shared library.
-shell _script_
Run as script, then exit.
-norc
Don't load init file (~/.eclrc).
-dir _directory_
Use directory as system directory.
-q
Reduce compiler output verbosity.

FAQ

What is the ecl command used for?

ECL (Embeddable Common Lisp) is an implementation of Common Lisp designed to be embedded in other applications. It compiles Lisp to C, enabling integration with C libraries and native code generation. ECL supports the full ANSI Common Lisp standard with extensions for threading, FFI (Foreign Function Interface), and embedding. It can produce standalone executables and shared libraries.

How do I run a basic ecl example?

Run `ecl` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -load _file_ do in ecl?

Load Lisp file.