<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 22, 2013 at 6:54 AM, Dietrich Bollmann <span dir="ltr"><<a href="mailto:dietrich@formgames.org" target="_blank">dietrich@formgames.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="im">On Tue, May 21, 2013 at 6:13 PM, Juan Jose Garcia-Ripoll <span dir="ltr"><<a href="mailto:juanjose.garciaripoll@gmail.com" target="_blank">juanjose.garciaripoll@gmail.com</a>></span> wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="im"><div class="gmail_extra">
<div><br>
</div>The CFFI model is simply too rigid: they assume that libraries can be loaded at run time, always. Instead ECL supports also a model in which libraries are linked with the compiled code, being available that way. I fear there is no way to work around this but using ECL's own FFI mingled with CFFI</div>
<div class="gmail_extra"><br></div></div><div class="gmail_extra"><div class="gmail_extra">> (ql:quickload :cffi)</div><div class="gmail_extra">> (compile-file "foo.lsp" :load t)</div></div></div></blockquote>
<div>
<br></div><div>Here what I get when trying this on windows:</div><div><br></div><div></div></blockquote></div><br>Your problem was the way you load quicklisp: you did it using the interpreter. If you use the C compiler, this has to be done all the way through, from the very beginning, as follows</div>
<div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra">(require :cmp)</div><div class="gmail_extra"><br></div><div class="gmail_extra">(load "~/quicklisp/setup.lisp")</div><div class="gmail_extra">
<br></div><div class="gmail_extra">(ql:quickload :cffi)</div><div class="gmail_extra"><br></div><div class="gmail_extra">(compile-file "foo.lsp")</div><div><br></div>So, I insist: it is possible to build and compile object files on Windows using the FFI. You simply have to deactivate the bytecodes compiler before doing anything.<br clear="all">
<div><br></div>-- <br>Instituto de Física Fundamental, CSIC<br>c/ Serrano, 113b, Madrid 28006 (Spain) <br><a href="http://juanjose.garciaripoll.googlepages.com" target="_blank">http://juanjose.garciaripoll.googlepages.com</a>
</div></div>