ECL: Compile Lisp to C
ECL: Compile Lisp to C
Hi,
i followed the instructions in http://ecls.sourceforge.net/new-manual/ch24s06.html and compiled a .lisp file into .fas and .o files, and finally into an executable (Ubuntu 10.10). But how can I produce a .c file?
i followed the instructions in http://ecls.sourceforge.net/new-manual/ch24s06.html and compiled a .lisp file into .fas and .o files, and finally into an executable (Ubuntu 10.10). But how can I produce a .c file?
Re: ECL: Compile Lisp to C
The .c file is obviously produced during compilation, because otherwise it wouldn't be possible to produce the .o file. It is the deleted, because it is not really designed for human consumption. I am not sure if there is exposed interface for suppressing the deletion, but you can set the c::*delete-files* variable to NIL. Just don't expect the .c files to be comprehensible unless you already know something about ECL code generator.imba wrote:But how can I produce a .c file?
-
- Posts: 148
- Joined: Wed Jul 30, 2008 11:26 pm
Re: ECL: Compile Lisp to C
If you just want to see the code generated for a particular function, I think DECOMPILE can show you that in ECL. Something like that; it's in the manual.
Re: ECL: Compile Lisp to C
Strange: This doesn't work on Debian. Is there a way to prevent *my-program*.c and .h from being deleted?Ramarren wrote:The .c file is obviously produced during compilation, because otherwise it wouldn't be possible to produce the .o file. It is the deleted, because it is not really designed for human consumption. I am not sure if there is exposed interface for suppressing the deletion, but you can set the c::*delete-files* variable to NIL. Just don't expect the .c files to be comprehensible unless you already know something about ECL code generator.imba wrote:But how can I produce a .c file?
Re: ECL: Compile Lisp to C
What exactly did you do? Also, are you looking in a correct place? Temporary files, which, as I said, the .c and .h files are from ECL perspective, might be somewhere under /tmp/ or ~/.fasls or whatever. Look at compilation commands which scroll by while compiling anything with ECL.
Re: ECL: Compile Lisp to C
I wrote a bash script, which creates a backup of the .c/.h files after being written to them.
Now I have another question: Did anyone manage to compile ECL on Windows using MSVC++? I get the error "msvcrt.lib" not found (by nmake), although ...\VC\lib is in PATH.
Now I have another question: Did anyone manage to compile ECL on Windows using MSVC++? I get the error "msvcrt.lib" not found (by nmake), although ...\VC\lib is in PATH.
Re: ECL: Compile Lisp to C
It's designed to work with GCC iirc.imba wrote:I wrote a bash script, which creates a backup of the .c/.h files after being written to them.
Now I have another question: Did anyone manage to compile ECL on Windows using MSVC++? I get the error "msvcrt.lib" not found (by nmake), although ...\VC\lib is in PATH.
Probably a number of GNU-isms in the code.
Re: ECL: Compile Lisp to C
I found a working Windows version: http://ecls.wikispaces.com/VCExpress