(defun hello () (format t "hello, world.")) (sb-ext:save-lisp-and-die "hello-world-sbcl.exe" ; .exe をつける(Windows 用) :toplevel #'hello ; トップレベルをhelloに :compression t ; 圧縮 :executable t)
;; "hello, world." と出力するだけのプログラム (sb-ext:save-lisp-and-die "hello-world-sbcl.exe" ; .exe をつける(Windows 用) :toplevel #'(lambda () (format t "hello, world.")) :compression t ; 圧縮 :executable t)
sbcl.exe --noinform --no-sysinit --no-userinit --load source.lisp
sbcl の個人用初期設定ファイル ~/.sbclrc を読み込ませるときには、つぎのように入力する(--no-userinit オプションをつけない)。
sbcl.exe --noinform --no-sysinit --load source.lisp