[Ecls-list] Building native EXE on Windows is too hard!
Matthew Mondor
mm_lists at pulsar-zone.net
Thu Nov 8 09:45:22 UTC 2012
On Thu, 8 Nov 2012 10:04:47 +0200
Ralph Möritz <ralph.moeritz at outlook.com> wrote:
> Re. #2, I don't really mind what ECL does with large constant strings behind the
> scenes, the point is that ECL *knows* which compiler it's using so it *could* do whatever is
> necessary such as setting *COMPILE-IN-CONSTANTS* or passing the appropriate compiler switches
> to find the ECL libs. If Franjo & the regulars don't have time to implement this,
> I'll be happy to do it myself & post a patch - Just let me know where in the source to start looking.
I also think that it might be possible to have *COMPILE-IN-CONSTANTS*
automatically default to T where possible eventually.
For the library paths, on ELF systems RPATH can be used (such that the
runtime linker knows where to look for libraries without extra
configuration) and ECL is supposed to automatically link objects with
the required ECL library. Then again I unfortunately don't know for
the equivalent of RPATH for Windows PECOFF here.
> Re. #3, `ecl -o <executable -link <object>` works, but only after producing the object file, which still
> requires all the manual steps mentioned because `ecl -compile <lisp>` produces a FASL file, and `ecl -o
> <object> -compile <lisp>` gives the following error: (Provided `(ext:install-c-compiler)` is in your .eclrc,
> otherwise it just produces FASL output)
>
> LINK : fatal error LNK1149: output filename matches input filename 'C:\Users\ralphm\Temp\src\experiments\lisp\hello-ecl\hello.obj'
To avoid needing a special eclrc when using build scripts, it's also
however possible to use -eval (along with -norc). For instance, in a
GNUmakefile for a project I use the following rule to produce .o
objects before linking them (also note the -s to produce "system"
objects rather than final fasl ones):
%.o: %.lisp
$(ECL) -eval '(progn (setf c::*compile-in-constants* t) (pushnew :mm-ecl-standalone *features*))' -o $@ -s -compile $<
I suspect that as part of that PROGN, (ext:install-c-compiler) could
also be included... The complete makefile is here, but it was only
tested on unix systems:
http://cvs.pulsar-zone.net/cgi-bin/cvsweb.cgi/~checkout~/mmondor/mmsoftware/cl/server/GNUmakefile?content-type=text%2Fplain
Juanjo is better placed than I am to definitely answer and also tests
ECL on Windows, I suspect he'll reply when he's available as well.
--
Matt
More information about the ecl-devel
mailing list