Compiling to Binary in sbcl
Posted: Fri Jul 30, 2010 11:10 am
Another newb question, this time in sbcl. Here's my "hello.lisp":
And here's what I run in sbcl:
And here's my result at the shell:
What's going on? All I want to do is compile a program into a binary and have it run uninterpreted. Why it it complaining about type?
The second question is how to make sbcl exit when the program complete, or better yet cut sbcl out of the process and run it on workstations with no lisp environment installed.
SigmaX
Code: Select all
(defun main()
(print "hello, world!"))
Code: Select all
(load "hello.lisp")
(sb-ext:save-lisp-and-die "my_binary" :executable t :toplevel 'main)
Code: Select all
$ ./my_binary
"hello, world!"
debugger invoked on a TYPE-ERROR in thread #<THREAD "i, have it run and be left alone by sbcl.nitial thread" {1002685FB1}>:
The value "hello, world!" is not of type (SIGNED-BYTE 32).
Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.
(no restarts: If you didn't do this on purpose, please report it as a bug.)
(SB-UNIX:UNIX-EXIT "hello, world!")
The second question is how to make sbcl exit when the program complete, or better yet cut sbcl out of the process and run it on workstations with no lisp environment installed.
SigmaX