Quick vid on using buildapp to build an exe from cmd and from bash. The quoting and escaping is a little different in cmd.exe.
Note that normally you would not input your code directly into the shell like this, but I only saw examples of doing this on linux, so figured I would add one for cmd.
You can install buildapp with a package manager if you want:
sudo apt install buildapp
Or you can just open up sbcl and use buildapp to build a binary in the current directory, then make sure to add to path so you can run from anywhere:
(ql:quickload :buildapp)
(buildapp:build-buildapp)
(quit)
Now you can use the buildapp binary to create lisp images.
Cmd Version:
buildapp ^
--eval "(defun main (args) (format t """~d""" (+ (parse-integer (second args)) (parse-integer (third args)))))" ^
--entry main ^
--output add-me
Usage: add-me 12 34
Bash Version:
buildapp \
--eval '(defun main (args) (format t "~d" (+ (parse-integer (second args)) (parse-integer (third args)))))' \
--entry main --output add-me
Usage: ./add-me 23 248
Негізгі бет 32nd CL, Buildapp Build Common Lisp Image from cmdline
Пікірлер