I wrote Buildapp for SBCL to make this a little easier and command-liney. I use it all the time.<p><a href="http://xach.com/lisp/buildapp/" rel="nofollow">http://xach.com/lisp/buildapp/</a>
For CLisp on Windows, one should also put the DLL-files from Base/Full within same directory. For base-users, this means libiconv-2.dll, libintl-8.dll and readline5.dll. For Full, this means zlib1.dll (if you're using it), pcre.dll and svm.dll. Windows usually complain about not finding these, so for portability you should keep them there.
Yes, this is the thing that probably most annoys people coming from languages like C about Lisp. Producing a standalone executable is non-obvious, and different from implementation to implementation. Commercial implementations make this simple, but generally, folks learning the language aren't using commercial implementations. It's funny though when you realize that it's not any harder than Java or a scripting language.
In clojure/lein[1][2] it's simple enough though not really equivalent to a real executable:<p><pre><code> lein uberjar
</code></pre>
That'll create a standalone jar. But, of course, the computer will need some sort of JRE.<p>This definitely reminds me of creating executables in python. Even though python really isn't a lisp it has seemingly crazy, difficult and under-developed and underutilized ways to create executables.. somewhat surprising considering how popular it is today[3].<p>[1] See <a href="http://clojure.org/" rel="nofollow">http://clojure.org/</a><p>[2] See <a href="https://github.com/technomancy/leiningen" rel="nofollow">https://github.com/technomancy/leiningen</a><p>[3] Long list ... all have pluses and minuses <a href="http://www.py2exe.org/" rel="nofollow">http://www.py2exe.org/</a> <a href="http://pypi.python.org/pypi/py2app/" rel="nofollow">http://pypi.python.org/pypi/py2app/</a> <a href="http://www.pyinstaller.org/" rel="nofollow">http://www.pyinstaller.org/</a> <a href="http://pypi.python.org/pypi/bbfreeze/0.97.2" rel="nofollow">http://pypi.python.org/pypi/bbfreeze/0.97.2</a> <a href="http://cx-freeze.sourceforge.net/" rel="nofollow">http://cx-freeze.sourceforge.net/</a>
Interpreted programming languages (especially ones with a REPL) are great for their low barrier of entry. However, once someone wants to make an easily distributable executable, they have to jump through numerous hoops.<p>The only exception to this problem are VMs which are often clunky and restricted to code precompiled for a specific version of a VM. I would like to see more solutions to this dilema, examples of which can be seen in py2exe and pyinstaller, for Python.<p>Edit: This is a general thought, and not a dig against Lisp. It is made clear by Stack Overflow answers that many implementations of Lisp have easy ways to make executables which are well documented.