Hi,
reading the UFFI docs, and also one or two other FFI projects
documentations, I almost only see documentation about calling C
functions. Is it possible with any FFI library to call anything else,
like maybe FORTRAN or assembly function or binding Python, Ruby or C++
classes to CLOS ones?
Curiously,
Nowhere man
--
···········@levallois.eu.org
OpenPGP 0xD9D50D8A
>>>>> "Pierre" == Pierre THIERRY <···········@levallois.eu.org> writes:
Pierre> Hi,
Pierre> reading the UFFI docs, and also one or two other FFI projects
Pierre> documentations, I almost only see documentation about calling C
Pierre> functions. Is it possible with any FFI library to call anything else,
Pierre> like maybe FORTRAN or assembly function or binding Python, Ruby or C++
It's fairly common for Fortran calling conventions to be compatible,
in some way, to C calling conventions. This usually means digging up
your Fortran and/or C manual to find out the calling conventions for
Fortran. Usually, there's some change in the naming of the Fortran
function, and all arguments are pointers (call-by-reference), with
some hidden parameters for Fortran strings and Fortran return values
like complex numbers.
This is for Fortran 77. Don't know about Fortran 9x.
Ray
You could call c++ if you use :
extern "C" in your c++ definitions so your dll will get c mangling
instead
of c++ . That usually means modify source file or write wrapper c code
for c++ functions.
I haven't use it for any other language beside C++.
Le Fri, 14 Jul 2006 11:56:32 -0700, fireblade a écrit :
> You could call c++ if you use : extern "C" in your c++ definitions so
> your dll will get c mangling instead of c++ . That usually means
> modify source file or write wrapper c code for c++ functions. I
> haven't use it for any other language beside C++.
I was more hoping to find a reflection between C++ classes and CLOS,
maybe a bit like Boost.Python does (which I didn't use, in fact, I just
read it's documentation, as I use a lot of other Boost libs...).
Alternatively,
Nowhere man
--
···········@levallois.eu.org
OpenPGP 0xD9D50D8A
Pierre THIERRY wrote:
> Le Fri, 14 Jul 2006 11:56:32 -0700, fireblade a écrit :
> > You could call c++ if you use : extern "C" in your c++ definitions so
> > your dll will get c mangling instead of c++ . That usually means
> > modify source file or write wrapper c code for c++ functions. I
> > haven't use it for any other language beside C++.
>
> I was more hoping to find a reflection between C++ classes and CLOS,
> maybe a bit like Boost.Python does (which I didn't use, in fact, I just
> read it's documentation, as I use a lot of other Boost libs...).
>
> Alternatively,
> Nowhere man
> --
> ···········@levallois.eu.org
> OpenPGP 0xD9D50D8A
Yea boost is nice if I check in it first I wouldn't have to write my
own
version of A* search , but I'm not regretting my decision as I learned
a plenty.
Anyway what kind of library do you need from boost written in lisp ?
Le Mon, 17 Jul 2006 11:47:01 -0700, fireblade a écrit :
> Anyway what kind of library do you need from boost written in lisp ?
That's not that I need anyhting in Boost. I'm writing an application in
C++ and I'd like to interface with it in some CL code.
Quickly,
Nowhere man
--
···········@levallois.eu.org
OpenPGP 0xD9D50D8A
Hi,
SWIG 1.3 seems to target ACL, CLISP and UFFI:
http://www.swig.org/Doc1.3/Lisp.html#Lisp
It's a wrapper generator that makes it possible to use C and C++
interfaces (including C++ classes) from your favourite language. I
don't know of any Python/Ruby/... interface wrappers for Common Lisp,
though.
Mata ne,
Matthias