[asdf-devel] ASDF's MAKE-BUILD breaks ECL's DLL target
Juan Jose Garcia-Ripoll
jj.garcia.ripoll at csic.es
Thu Jun 27 21:35:12 UTC 2013
On Thu, Jun 27, 2013 at 10:55 PM, Faré <fahree at gmail.com> wrote:
> I'd like to add a test in test-bundle.script.
> I tried this:
>
> (operate 'dll-op :test-asdf/bundle-2)
> (si:load-foreign-module (first (output-files 'dll-op
> :test-asdf/bundle-2)))
>
> (ffi:def-function "init_dll_BUNDLE_2" () :returning :void)
> (init-dll-BUNDLE-2)
>
> But the function call fails, because it the test script is
> interpreted, not compiled.
> How do I call the initialization function from the interpreter?
>
The initialization function cannot be directly called, so I would rather
recommend the following solution. First, file2.lisp is changed as below.
Then, instead of calling a function, we verify that the library is
available by serching for a symbol
(si::find-foreign-symbol "sample_function" "name-of-dll" :pointer-void 0)
---- file2.lisp ----
#+ecl
(ffi:clines "
extern int sample_function();
int sample_function()
{
return 0;
}
")
--
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://quinfog.iff.csic.es
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/asdf-devel/attachments/20130627/42a38b76/attachment.html>
More information about the asdf-devel
mailing list