Further on MEX
Aravindh Krishnamoorthy
aravindh.k.dev at gmail.com
Mon Jan 5 12:16:05 CST 2009
Dear Michael,
You're pointing to: libffi. BSD licensed libffi can handle calls +
parameter passing. Thanks.
Also, of course, we'd like to restrict the shared-object's to the
respective platform: Linux .so's from Linux, Windows .DLLs from
Windows. Sensible?
Also, Matlab requires a header file (with c-signatures) to be passed
during 'loadlibrary' call which is parsed using perl (best I can
remember.) ATM, I don't know how we mirror that to Octave.
Yours sincerely,
Aravindh
2009/1/5 Michael Goffioul <michael.goffioul at gmail.com>:
> On Sun, Jan 4, 2009 at 9:57 AM, Aravindh Krishnamoorthy
> <aravindh.k.dev at gmail.com> wrote:
>> 3. [feature-req] What is the take on supporting 'loadlibrary', etc
>> functions in Octave?
>
> Calling a foreign function in binary form (that is, without a compilation
> step) will inevitably involve some assembly coding and will be
> processor specific. I've worked on this in the past to bridge LISP
> with foreign C code and it's not a straightforward job (it's more
> than just loading a shared library; you have to know how to pass
> arguments to functions, in which registers, in which order, how
> to clean up the stack...). There are probably some libraries out there
> to ease this task (IIRC one was named fficall).
>
> Michael.
>
More information about the Octave-maintainers
mailing list