By pointer - off course.<br><br>That led me into the minefield of setting up pointers, which I avoided by looking by the cl-blapack library since it has a set-up to define fortran types and necessary pointers on top of cffi.  <br>
<br>
I managed to compile blapack and foreign-numeric-vector libraries (I had to ignore some things, and delete others, but I will report that on the lisp-matrix group where that library was discussed).  <br><br>I then adapted some of the calls in blapack for my library (amos library on <a href="http://netlib.org">netlib.org</a> for calculating bessel functions of complex arguments), and initial tests are passing.<br>
<br>Thanks for the cffi library :-)<br><br>Mirko<br><br><br><br><div class="gmail_quote">On Wed, Sep 2, 2009 at 12:40 AM, Mark Hoemmen <span dir="ltr"><<a href="mailto:mark.hoemmen@gmail.com" target="_blank">mark.hoemmen@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>On Tue, Sep 1, 2009 at 14:28, Mirko Vukovic<<a href="mailto:mirko.vukovic@gmail.com" target="_blank">mirko.vukovic@gmail.com</a>> wrote:<br>


> ;; I got the trailing underscore by using `nm' on the library.<br>
> (defcfun "test_link_" test-link (a :float))  ;  (b :float) (i :int))<br>
<br>
</div>Fortran passes by pointer ("by reference" is the proper way to call<br>
it, unless you're a C programmer) unless the Fortran subroutine /<br>
function specifically tags the variable as a "value" type.  You're<br>
not, so a, b, and i should all be pointers in the above defcfun.<br>
<br>
mfh<br>
<br>
_______________________________________________<br>
cffi-devel mailing list<br>
<a href="mailto:cffi-devel@common-lisp.net" target="_blank">cffi-devel@common-lisp.net</a><br>
<a href="http://common-lisp.net/cgi-bin/mailman/listinfo/cffi-devel" target="_blank">http://common-lisp.net/cgi-bin/mailman/listinfo/cffi-devel</a><br>
</blockquote></div><br>