Re: compiling a Lisp source to exe



In article
<4e36fe48-6a6b-4e0d-95a5-642f6edcf0d0@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
cartercc <cartercc@xxxxxxxxx> wrote:

Is it possible to compile a Lisp source file to an exe on an x86
machine running Windows?

Using gcc (on Windows) like this: [>gcc -o hello.exe hello.c] will
produce a file that I can run natively. Is it possible to do this same
with a Lisp file?

It depends on the Lisp implementation. You need to
consult its manual. LispWorks for example can save
images or create applications for delivery. The manual
describes how to do that.

Which Lisp implementation are you using?

When I run compile-file I don't get anything I can copy to another
machine (with a Lisp) and run.

When you use COMPILE-FILE, you get a piece of compiled Lisp code.
The Lisp code is not portable between different Lisp implementations,
but you can move the compiled code (the 'fasl' file) to another machine,
start the Lisp implementation there and load the compiled file.
So, when you have, say, LispWorks on both Windows machines
you can compile the file on one machine, copy the file to the
other machine and LOAD the file there into LispWorks.
If you have function calls in the file, they will be executed
upon loading - you can also call the defined functions
after loading the compiled file.


Thanks, CC

--
http://lispm.dyndns.org/
.



Relevant Pages

  • Re: "Recompile" VS delete all fasl and load + compile
    ... I am a newbie to Lisp. ... need to recompile all the lisp files in order to run it. ... I tried "compile-file", but there are nested multiple files that I ... Defsystem is not part of the standard, but most Lisp implementations offer their own version defsystem tool, and there are also a few open source ones (e.g. ...
    (comp.lang.lisp)
  • Re: best environment for learning Lisp?
    ...     T ... It is also good to read the manual of the Lisp implementation ... But this is really covered in the manuals, ... 'Practical Common Lisp' mentions load and compile-file in chapter 2 in the section 'Saving Your Work': ...
    (comp.lang.lisp)
  • Re: compiling a Lisp source to exe
    ... When I run compile-file I don't get anything I can copy to another ... machine (with a Lisp) and run. ... Programs like Photoshop or 3D Studio Max still make sense to run ...
    (comp.lang.lisp)
  • Re: compiling a Lisp source to exe
    ... When I run compile-file I don't get anything I can copy to another ... machine (with a Lisp) and run. ... standalone executables, ...
    (comp.lang.lisp)
  • Re: Structure of a lisp system.
    ... Emacs is a suitable editor for Lisp. ... Check out COMPILE-FILE in the CLHS. ... sort of functionality you'd get from the C or C++ standard libraries. ...
    (comp.lang.lisp)