How to load the jna jar file before cffi?

Mirko Vukovic mirko.vukovic at gmail.com
Wed May 10 20:24:46 UTC 2017


Hello,

In order for CFFI to load, I need to load jna-4.2.2.jar.

Right now, I have to do something like this:
(let ((jar-pathname
#P"c:/Users/977315/.m2/repository/net/java/dev/jna/jna/4.2.2/jna-4.2.2.jar"))
  (java:add-to-classpath (namestring jar-pathname)))

To automate loading of ASDFs that require CFFI I tried to automate the
process by adding a before method to 'load-op:

(eval-when (:compile-toplevel :execute :load-toplevel)
  (defmethod operate :before ((operation (eql 'asdf/lisp-action:load-op))
(component (eql :cffi)))
    (let ((jar-pathname
#P"c:/Users/977315/.m2/repository/net/java/dev/jna/jna/4.2.2/jna-4.2.2.jar"))
      (java:add-to-classpath (namestring jar-pathname)))))

That did not work.  I did read the ASDF manual, but could not figure out
how to do it.

I suspect someone has figured out the right way.  What is it?

Thanks,

Mirko
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/armedbear-devel/attachments/20170510/e6ddb8cf/attachment.html>


More information about the armedbear-devel mailing list