编译Common Lisp的一个可执行 [英] Compiling Common Lisp to an executable

查看:345
本文介绍了编译Common Lisp的一个可执行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近开始使用SBCL学习Common Lisp的。我如何可以编译我的Lisp程序为Windows二进制?

I recently started learning Common Lisp using SBCL. How can I compile my Lisp programs into a Windows binary?

推荐答案

制作用hello.exe:

Making hello.exe:

* (defun main () (print "hello"))

MAIN
* (sb-ext:save-lisp-and-die "hello.exe" :toplevel #'main :executable t)
[undoing binding stack and other enclosing state... done]
[saving current Lisp image into hello.exe:
writing 3160 bytes from the read-only space at 0x22000000
writing 2592 bytes from the static space at 0x22100000
writing 30134272 bytes from the dynamic space at 0x22300000
done]
> dir hello.exe
31,457,304 hello.exe
> hello.exe

"hello"

31 MB可执行文件!

31 MB executable file!

这篇关于编译Common Lisp的一个可执行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆