Linux怎么运行lisp,buildapp 生成独立可执行lisp程序

buildapp 是一个开源lisp项目, BSD 协议  把sbcl 的lisp 代码编译成独立可执行程序。可以把lisp 脚本编译成一个二进制的执行文件由于他需要把所有的引用到的package 都会混进去,还有sbcl 的imag

。所以出来的包有点大一个hellow-world 也有4,50m

安装:

sbcl(ql:quickload "buildapp")

(buildapp:build-buildapp)

windows 下就生成了 windows/system32/buildapp.exe

linux 下/usr/local/bin/buildapp

vim  a.lisp

(defun main(argv)

(format t "hellow world"))

(main 1)

uildapp.exe  --output  hellow   --load a.lisp  --entry main C:\Windows\system32>buildapp.exe --output hellow --load a.lisp --entry maThis is experimental prerelease support for the Windows platform. useat your own risk. "Your Kitten of Death awaits!"This is experimental prerelease support for the Windows platform. useat your own risk. "Your Kitten of Death awaits!";; loading file #P"C:/Windows/system32/a.lisp"; file: C:/Windows/system32/a.lisp; in: DEFUN MAIN; (DEFUN MAIN (ARGV) (FORMAT T "hellow world")); --&gt PROGN SB-INT:NAMED-LAMBDA; ==>; #'(SB-INT:NAMED-LAMBDA MAIN; (ARGV); (BLOCK MAIN (FORMAT T "hellow world")));; caught STYLE-WARNING:; The variable ARGV is defined but never used.;; compilation unit finished; caught 1 STYLE-WARNING condition[undoing binding stack and other enclosing state... done][saving current Lisp image into hellow.exe:writing 2888 bytes from the read-only space at 0x22000000writing 1712 bytes from the static space at 0x22100000writing 27717632 bytes from the dynamic space at 0x22300000done]

C:\Windows\system32>hellow.exe

This is experimental prerelease support for the Windows platform. useat your own risk. "Your Kitten of Death awaits!

hellow world

C:\Windows\system32>

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/133735/viewspace-734067/,如需转载,请注明出处,否则将追究法律责任。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值