build - 将 Common Lisp 编译为可执行文件

我最近开始使用 SBCL 学习 Common Lisp。如何将我的 Lisp 程序编译成 Windows 二进制文件?

最佳答案

制作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 可执行文件!

https://stackoverflow.com/questions/14171849/

相关文章:

Xcode - 自动将文件夹中的所有文件添加到目标

java - Java项目中的build.xml

docker - Docker 构建上下文的目的是什么?

visual-studio - Visual Studio 有 'ccache' 吗?

maven-2 - 在 Maven 中,我可以在当前项目上方指定相对路径吗?

build - 寻找真实世界的 Gradle 示例

java - 在 Eclipse 中使用 Ant 时出现错误运行 javac.exe 编译器消息

maven - 如何使用 Gulp、Maven 和 Jenkins 组织完整的构建管道,一直到集成测

c++ - 如何在 CMake 中正确创建目标之间的依赖关系?

build - "fatal error U1087: cannot have : and::dep