On Sat, Jun 25, 2011 at 5:07 AM, Eric Schulte <span dir="ltr"><<a href="mailto:schulte.eric@gmail.com">schulte.eric@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

I have successfully<br>
compiled the ASDF package defining the library into a libelf.a library<br>
using the following command.<br>
<br>
  (asdf:make-build :elf :type :lib :move-here "/home/eschulte/src/elf/")<br>
<br>
While this seems to have been successful, and while I have been able to<br>
manipulate generic ECL lisp objects from within C code, I can not figure<br>
out how to access the lisp functions defined in this static library from<br>
a file of C code.<br></blockquote><div><br>You are still missing a crucial step: building your library into a program. This is the reason why MAKE-BUILD has another target, :type :program, which does the missing steps: linking C and Lisp code together.<br>

 </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
My latest attempt is the following run.c file.<br></blockquote><div><br>File is missing all the steps that MAKE-BUILD takes to initialize the library. There is a reason why MAKE-BUILD and C:BUILDER exist: to hide this interface from you because it is very ugly and prone to change -- if you read my other email today, those changes are related to this interface (loading libraries and initializing their data).<br>

<br>I now realize C:BUILDER and C:MAKE-BUILD might need another target, something like :standalone-lib or :standalone-dll, where one would simply specify the name of the library and its initialization function and it would do the rest. I will note it down.<br>

<br></div>Juanjo<br clear="all"></div><br>-- <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><br>