Sign in to follow this  
Paradigm Shifter

Compile lisp to executable?

Recommended Posts

So I am teaching myself Common LISP using CLISP. I was wondering how you would build a binary executable that works outside the lisp environment, is there a way to do this? I tried looking in the help files but they aren't very helpful about this. I'm using the Windows version of CLISP, clisp-2.38. It's pretty painful typing in expressions directly, I really need to learn how to use emacs at some point.

Share this post


Link to post
Share on other sites
First, you don't have to type expressions directly. You can do something like clisp < mylispfile.lsp or clisp mylispfile.lsp. The former works just as if you typed everything in, the latter requires you to have print statements in your code (see print, pprint, etc).

To create executables, look through the CLISP FAQ, it's mentioned in there if I recall correctly.

Share this post


Link to post
Share on other sites
It's really funny that you posted this. I was about to post something tonight to ask people about their experiences will functional game programming.

But anyway, one technique is to compile it to C code, and then use gcc to compile that. I've been getting into Gambit Scheme, and it comes with an interpreter and compiler. I'm not sure about CLISP, but I'm sure there's a similar method. Maybe you could look into Scheme if not.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this